srdusr
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crates/config/src/engine/general.rs8
-rw-r--r--crates/core/src/context_menu.rs14
-rw-r--r--crates/core/src/manager/mod.rs20
-rw-r--r--crates/core/src/window.rs4
-rw-r--r--crates/platform/src/ipc/types.rs6
-rw-r--r--crates/platform/src/pam_auth.rs6
-rw-r--r--crates/wayland/src/cursor.rs6
-rw-r--r--crates/wayland/src/decoration/border.rs8
-rw-r--r--crates/wayland/src/decoration/buttons.rs2
-rw-r--r--crates/wayland/src/decoration/corners.rs14
-rw-r--r--crates/wayland/src/decoration/shadow.rs2
-rw-r--r--crates/wayland/src/desktop_icons.rs6
-rw-r--r--crates/wayland/src/elements.rs30
-rw-r--r--crates/wayland/src/foreign_toplevel.rs4
-rw-r--r--crates/wayland/src/native_lock.rs20
-rw-r--r--crates/wayland/src/protocols/compositor.rs18
-rw-r--r--crates/wayland/src/protocols/xdg_decoration.rs2
-rw-r--r--crates/wayland/src/state/geometry.rs10
-rw-r--r--crates/wayland/src/state/layers.rs12
-rw-r--r--crates/wayland/src/state/mod.rs52
-rw-r--r--crates/wayland/src/udev/gpu.rs12
-rw-r--r--crates/wayland/src/udev/mod.rs14
-rw-r--r--crates/wayland/src/udev/platform.rs14
-rw-r--r--crates/wayland/src/virtual_pointer.rs6
-rw-r--r--crates/wayland/src/winit/mod.rs4
-rw-r--r--crates/wayland/src/xwayland.rs6
-rw-r--r--crates/x11/src/platform/trait_impl.rs16
27 files changed, 158 insertions, 158 deletions
diff --git a/crates/config/src/engine/general.rs b/crates/config/src/engine/general.rs
index 05f0f66..f4ada33 100644
--- a/crates/config/src/engine/general.rs
+++ b/crates/config/src/engine/general.rs
@@ -77,10 +77,10 @@ impl Engine {
/// connected (real Wayland/X11 display available, `WAYLAND_DISPLAY`/
/// `DISPLAY` set for anything `srd.spawn`ed from the handler to inherit)
/// - see `main.rs`. Config that starts background processes (a bar,
- /// wallpaper daemon, clipboard watcher) belongs in a `"ready"` handler,
- /// not at a config file's top level: top-level code runs during
- /// `load_init`, which is *before* the platform connects, so anything
- /// spawned there inherits no display socket to connect to at all.
+ /// wallpaper daemon, clipboard watcher) belongs in a `"ready"` handler,
+ /// not at a config file's top level: top-level code runs during
+ /// `load_init`, which is *before* the platform connects, so anything
+ /// spawned there inherits no display socket to connect to at all.
pub(super) fn fn_on(&self) -> Result<mlua::Function<'_>> {
let state = self.state.clone();
Ok(self.lua.create_function(move |lua, (name, f): (String, mlua::Function)| {
diff --git a/crates/core/src/context_menu.rs b/crates/core/src/context_menu.rs
index f56c7b9..f06e07c 100644
--- a/crates/core/src/context_menu.rs
+++ b/crates/core/src/context_menu.rs
@@ -51,11 +51,11 @@ pub enum MenuAction {
Separator,
/// A non-interactive section label (`"Move to Workspace"`, `"Customize"`)
/// - dimmer, smaller text, never highlighted, click is a no-op just
- /// like [`Self::Separator`]. Replaces an earlier hack that embedded
- /// box-drawing characters directly in an ordinary item's label, which
- /// rendered (and behaved, right up until the dispatch site's own
- /// special-case) exactly like a clickable row that happened to do
- /// nothing - confusing on both counts.
+ /// like [`Self::Separator`]. Replaces an earlier hack that embedded
+ /// box-drawing characters directly in an ordinary item's label, which
+ /// rendered (and behaved, right up until the dispatch site's own
+ /// special-case) exactly like a clickable row that happened to do
+ /// nothing - confusing on both counts.
Header,
}
@@ -180,8 +180,8 @@ impl ContextMenu {
/// The y-offset row `index` starts at, relative to the menu's own top
/// - every row height up to (not including) `index`, summed. `row_
/// at`/rendering both walk rows this same way, so a mismatch between
- /// "where a row is drawn" and "where a click resolves to" can't creep
- /// in from computing the two differently.
+ /// "where a row is drawn" and "where a click resolves to" can't creep
+ /// in from computing the two differently.
pub fn row_y(&self, index: usize) -> i32 {
(0..index.min(self.items.len())).map(|i| self.row_height_for(i)).sum::<u32>() as i32
}
diff --git a/crates/core/src/manager/mod.rs b/crates/core/src/manager/mod.rs
index 64cf5c3..77fcf3c 100644
--- a/crates/core/src/manager/mod.rs
+++ b/crates/core/src/manager/mod.rs
@@ -119,12 +119,12 @@ pub struct WindowManager {
/// owns real output hardware (`drain_output_position_requests`) on its
/// own next poll. Core has no way to reposition a real `Output` itself
/// - monitor geometry flows one direction, backend into core, via
- /// `set_monitors` - so a request from an IPC caller (an AGS display-
- /// settings panel wanting to set up monitor mirroring, concretely) has
- /// to cross back over that boundary the same indirect way window
- /// geometry changes do in the other direction: queued here, applied by
- /// the backend, and `set_monitors` reports the result back on the
- /// backend's next monitor query, same as any other hotplug/reconfigure.
+ /// `set_monitors` - so a request from an IPC caller (an AGS display-
+ /// settings panel wanting to set up monitor mirroring, concretely) has
+ /// to cross back over that boundary the same indirect way window
+ /// geometry changes do in the other direction: queued here, applied by
+ /// the backend, and `set_monitors` reports the result back on the
+ /// backend's next monitor query, same as any other hotplug/reconfigure.
output_position_requests: Vec<(MonitorId, i32, i32)>,
/// Same cross-boundary-request pattern as `output_position_requests`
/// just above, for Phase 2 of the multi-cursor plan - pinning a
@@ -206,9 +206,9 @@ pub struct WindowManager {
/// switching workspace changes what's visible on every screen at
/// once). Still meaningful even when `per_monitor_workspaces` is `true`
/// - it's the fallback `workspace_for_monitor` returns for a monitor
- /// that has never had its own workspace switched independently yet,
- /// and what a plain `current_workspace()` call reports either way. See
- /// `visible_windows`'s doc comment for the filter this actually drives.
+ /// that has never had its own workspace switched independently yet,
+ /// and what a plain `current_workspace()` call reports either way. See
+ /// `visible_windows`'s doc comment for the filter this actually drives.
current_workspace: WorkspaceId,
/// Whichever workspace was current immediately before the current one
/// became current - see `switch_workspace`'s doc comment.
@@ -244,7 +244,7 @@ pub struct WindowManager {
/// turned on, or a newly connected monitor) falls back to
/// `current_workspace`, the same shared value shared-mode always uses
/// - see `workspace_for_monitor`. Unused, and left empty, whenever
- /// `per_monitor_workspaces` is `false`.
+ /// `per_monitor_workspaces` is `false`.
monitor_workspaces: HashMap<MonitorId, WorkspaceId>,
next_workspace_id: WorkspaceId,
next_window_id: WindowId,
diff --git a/crates/core/src/window.rs b/crates/core/src/window.rs
index 21b7ab4..724aab3 100644
--- a/crates/core/src/window.rs
+++ b/crates/core/src/window.rs
@@ -498,8 +498,8 @@ pub const DECORATED_TOP_RESIZE_MARGIN: i32 = RESIZE_MARGIN;
/// How much wider than [`RESIZE_MARGIN`] a corner's own diagonal-resize
/// zone reaches, as a multiplier on whatever margin is actually in effect
/// - see `ResizeEdge::resize_edge_at`'s doc comment for why corners need
-/// more room than a straight edge at all, not just a proportionally bigger
-/// dead-simple hit box.
+/// more room than a straight edge at all, not just a proportionally bigger
+/// dead-simple hit box.
///
/// Bumped from `3` (18px at the default `RESIZE_MARGIN`) to `5` (30px):
/// reported live as still too tight to land reliably, and there's real
diff --git a/crates/platform/src/ipc/types.rs b/crates/platform/src/ipc/types.rs
index 3243e31..0a8653c 100644
--- a/crates/platform/src/ipc/types.rs
+++ b/crates/platform/src/ipc/types.rs
@@ -422,9 +422,9 @@ pub(crate) struct WorkspacesEvent<'a> {
/// A third, independently-diffed event on the same `subscribe` connection
/// - see `WorkspacesEvent`'s own doc comment for why this isn't folded
-/// into either of the other two: a layout cycle touches no window and no
-/// workspace, so it needs its own change-diff to avoid pushing an
-/// unrelated payload on every unrelated change.
+/// into either of the other two: a layout cycle touches no window and no
+/// workspace, so it needs its own change-diff to avoid pushing an
+/// unrelated payload on every unrelated change.
#[derive(Serialize)]
pub(crate) struct KeyboardLayoutEvent<'a> {
pub(crate) event: &'static str,
diff --git a/crates/platform/src/pam_auth.rs b/crates/platform/src/pam_auth.rs
index bdad439..e9e5841 100644
--- a/crates/platform/src/pam_auth.rs
+++ b/crates/platform/src/pam_auth.rs
@@ -34,9 +34,9 @@ const SERVICE: &str = "srdwm";
/// password itself, resolves to `false`. Deliberately no distinction
/// between "wrong password" and "something is broken" in the return value
/// - fail secure means every non-success path stays locked, not just the
-/// ones that are the user's own fault. Logged at `warn` for whoever's
-/// debugging a setup problem, never at a level that would put the
-/// password itself in a log.
+/// ones that are the user's own fault. Logged at `warn` for whoever's
+/// debugging a setup problem, never at a level that would put the
+/// password itself in a log.
pub fn authenticate(username: &str, password: &str) -> bool {
let conversation = Conversation::with_credentials(username, password);
let mut context = match Context::new(SERVICE, Some(username), conversation) {
diff --git a/crates/wayland/src/cursor.rs b/crates/wayland/src/cursor.rs
index 0d65e6a..0ad5248 100644
--- a/crates/wayland/src/cursor.rs
+++ b/crates/wayland/src/cursor.rs
@@ -471,9 +471,9 @@ pub(crate) fn make_buffers() -> CursorBuffers {
/// [`pointer_bitmap`]'s hotspot: the fingertip, near the top of the canvas
/// - unlike the centered resize/crosshair/move shapes, a pointing hand's
-/// "active point" for click purposes is where the finger tip actually is,
-/// the same reasoning the built-in arrow's tip-at-origin hotspot already
-/// uses.
+/// "active point" for click purposes is where the finger tip actually is,
+/// the same reasoning the built-in arrow's tip-at-origin hotspot already
+/// uses.
const POINTER_HOTSPOT: (i32, i32) = (9, 1);
/// One cursor render element, whatever the source.
diff --git a/crates/wayland/src/decoration/border.rs b/crates/wayland/src/decoration/border.rs
index 9e29fe6..0d7443d 100644
--- a/crates/wayland/src/decoration/border.rs
+++ b/crates/wayland/src/decoration/border.rs
@@ -1,7 +1,7 @@
//! The four solid-colour strips around a decorated window's own `geometry`
//! - top/bottom rendered as small rounded bitmaps (their own two outer
-//! corners cut to match `titlebar::render_titlebar`'s), left/right left to
-//! the caller as plain flat fills (`elements::border_side_render_element`).
+//! corners cut to match `titlebar::render_titlebar`'s), left/right left to
+//! the caller as plain flat fills (`elements::border_side_render_element`).
use super::color::rgb_to_bgra;
use super::corners::{round_bottom_corners, round_top_corners, InnerRing};
@@ -138,8 +138,8 @@ fn clip_middle_beyond_thickness(buf: &mut [u8], width: usize, radius: usize, row
/// decorated window or not (a decorated window still gets its own bottom
/// two corners content-masked - `RoundedCorners::BOTTOM_ONLY`, not `NONE`
/// - specifically so this strip has real rounded content to meet). See
-/// [`InnerRing`]'s own doc comment for why that's a different circle from
-/// the titlebar-aligned one `render_border_top` sometimes needs.
+/// [`InnerRing`]'s own doc comment for why that's a different circle from
+/// the titlebar-aligned one `render_border_top` sometimes needs.
pub fn render_border_bottom(width: u32, thickness: u32, color: (u8, u8, u8), radius: u32) -> Vec<u8> {
let (width, thickness) = (width.max(1) as usize, thickness.max(1) as usize);
let height = thickness.max(radius as usize).max(1);
diff --git a/crates/wayland/src/decoration/buttons.rs b/crates/wayland/src/decoration/buttons.rs
index bb2a709..07de32c 100644
--- a/crates/wayland/src/decoration/buttons.rs
+++ b/crates/wayland/src/decoration/buttons.rs
@@ -89,7 +89,7 @@ pub(super) fn button_box(width: usize, height: usize, offset: usize, from_left:
/// alpha to clip it away), this blends *toward* `color` over whatever's
/// already in `buf` - the titlebar background, always already opaque here
/// - so the result stays fully opaque at every edge pixel rather than
-/// letting the background show through a soft ring.
+/// letting the background show through a soft ring.
pub(super) fn fill_button_dot(buf: &mut [u8], width: usize, height: usize, offset: usize, from_left: bool, margin: f32, color: (u8, u8, u8)) {
let (x0, y0, x1, y1) = button_box(width, height, offset, from_left, margin);
let cx = (x0 + x1) as f32 / 2.0;
diff --git a/crates/wayland/src/decoration/corners.rs b/crates/wayland/src/decoration/corners.rs
index d3ec611..bec4253 100644
--- a/crates/wayland/src/decoration/corners.rs
+++ b/crates/wayland/src/decoration/corners.rs
@@ -277,14 +277,14 @@ fn scale_pixel(buf: &mut [u8], width: usize, x: usize, y: usize, mask: f32) {
/// cut anything *inside* it - so the strip's own "extra" rows (past its
/// nominal `border_width`, present whenever `corner_radius > border_width`
/// - see `render_border_top`'s own doc comment) stayed a solid *filled*
-/// quarter-disk out to the centre column/row, then hit `clip_middle_
+/// quarter-disk out to the centre column/row, then hit `clip_middle_
/// beyond_thickness`'s hard, unblended rectangular cut at exactly column/
-/// row `radius` - which is essentially the disk's own *most opaque*
-/// point (dead centre, mask ~1.0), not somewhere the curve had already
-/// faded out. The result: a solid wedge of border colour with two straight
-/// inner edges meeting the titlebar/content at a right angle, not a
-/// uniform-width curved ring - confirmed live, zoomed: a clean rectangular
-/// step, not a blend, reported as "squares on the inside corners."
+/// row `radius` - which is essentially the disk's own *most opaque*
+/// point (dead centre, mask ~1.0), not somewhere the curve had already
+/// faded out. The result: a solid wedge of border colour with two straight
+/// inner edges meeting the titlebar/content at a right angle, not a
+/// uniform-width curved ring - confirmed live, zoomed: a clean rectangular
+/// step, not a blend, reported as "squares on the inside corners."
///
/// The fix: cut *this* pixel wherever it falls within `border_width` of
/// the *same* shared centre `blend_corner_pixel` already cut around --
diff --git a/crates/wayland/src/decoration/shadow.rs b/crates/wayland/src/decoration/shadow.rs
index 7c89ae0..9b7f89f 100644
--- a/crates/wayland/src/decoration/shadow.rs
+++ b/crates/wayland/src/decoration/shadow.rs
@@ -229,7 +229,7 @@ pub(super) fn rounded_edge_distance(dx: u32, dy: u32, radius: u32) -> u32 {
/// How far outside `[margin, margin + extent)` - the window's own span
/// along one axis, inside the shadow's `margin`-pixel border on each side
/// - position `pos` sits, in pixels. `0` anywhere inside that span
-/// (including exactly on its edge).
+/// (including exactly on its edge).
fn edge_distance(pos: u32, margin: u32, extent: u32) -> u32 {
if pos < margin {
margin - pos
diff --git a/crates/wayland/src/desktop_icons.rs b/crates/wayland/src/desktop_icons.rs
index b556bef..7c9471a 100644
--- a/crates/wayland/src/desktop_icons.rs
+++ b/crates/wayland/src/desktop_icons.rs
@@ -155,9 +155,9 @@ fn desktop_dir(home: &Path) -> PathBuf {
/// desktop environment bootstraps an empty one on first run), sorted by
/// name. `saved` is `desktop_icons_state`'s own persisted `id -> cell` map
/// - an icon with a saved entry keeps that exact cell; every other icon
-/// (new files, or a first run with nothing saved yet) fills the next free
-/// cell in top-to-bottom, then wrap-to-next-column order, skipping any
-/// cell a saved icon already claims.
+/// (new files, or a first run with nothing saved yet) fills the next free
+/// cell in top-to-bottom, then wrap-to-next-column order, skipping any
+/// cell a saved icon already claims.
///
/// `rows_per_column` bounds how many icons stack vertically before
/// wrapping - derived from the primary monitor's own usable height, see
diff --git a/crates/wayland/src/elements.rs b/crates/wayland/src/elements.rs
index 1fafcae..7dc738f 100644
--- a/crates/wayland/src/elements.rs
+++ b/crates/wayland/src/elements.rs
@@ -273,8 +273,8 @@ pub(crate) fn rounded_content_buffer<'a>(
/// Every mapped layer-shell surface on `output` whose [`Layer`] `include`
/// accepts, each rendered via [`surface_content_elements`] at full opacity
/// - layer-shell surfaces (bars, docks, wallpaper engines) don't have a
-/// per-surface opacity concept the way `srd.rule`'s `opacity` gives
-/// windows.
+/// per-surface opacity concept the way `srd.rule`'s `opacity` gives
+/// windows.
///
/// Order matches smithay's own `space_render_elements` (0.7.0): `.rev()`
/// on `map.layers()` before rendering, so surfaces sharing one `Layer`
@@ -523,19 +523,19 @@ pub(crate) fn popup_surface_under(state: &CompState, pos: Point<f64, Logical>) -
/// by contrast, is always in *global* space (`Space` tracks every window
/// across the whole desktop, not per-output). Comparing the two directly
/// - what this function used to do - only ever produced a real overlap
-/// for a head whose own `origin` happened to be `(0, 0)`, i.e. the first/
-/// primary monitor in a left-to-right layout; every window on any other
-/// monitor could never be found "touched" by that monitor's own damage at
-/// all, no matter how much of it was actually changing on screen. A
-/// client relying on this path alone - a video window the user had
-/// switched focus *away* from, since the separate always-unconditional
-/// pass above only covers the focused/hovered window - never received
-/// another frame callback once srdwm's own bootstrap-configure frame
-/// callback was used up, and simply stopped rendering new frames forever:
-/// reported live as a paused-looking video on a second monitor, audio
-/// still playing underneath (a completely separate pipeline, unaffected).
-/// Same root cause and same fix shape as `output_layer_elements`'s own
-/// local/global mismatch, found earlier the same session.
+/// for a head whose own `origin` happened to be `(0, 0)`, i.e. the first/
+/// primary monitor in a left-to-right layout; every window on any other
+/// monitor could never be found "touched" by that monitor's own damage at
+/// all, no matter how much of it was actually changing on screen. A
+/// client relying on this path alone - a video window the user had
+/// switched focus *away* from, since the separate always-unconditional
+/// pass above only covers the focused/hovered window - never received
+/// another frame callback once srdwm's own bootstrap-configure frame
+/// callback was used up, and simply stopped rendering new frames forever:
+/// reported live as a paused-looking video on a second monitor, audio
+/// still playing underneath (a completely separate pipeline, unaffected).
+/// Same root cause and same fix shape as `output_layer_elements`'s own
+/// local/global mismatch, found earlier the same session.
pub(crate) fn windows_touched_by_damage<'a>(
space: &'a Space<DWindow>,
damage: &'a [Rectangle<i32, Physical>],
diff --git a/crates/wayland/src/foreign_toplevel.rs b/crates/wayland/src/foreign_toplevel.rs
index c6913a5..550eac9 100644
--- a/crates/wayland/src/foreign_toplevel.rs
+++ b/crates/wayland/src/foreign_toplevel.rs
@@ -194,8 +194,8 @@ fn announce(state: &mut CompState, manager: &ZwlrForeignToplevelManagerV1, id: W
/// Re-sends title/app_id/state/done to every handle a window currently has
/// - one per bound manager. Used both right after `announce` creates a
-/// fresh handle and whenever state actually changes (`set_maximized`,
-/// `update_activated`).
+/// fresh handle and whenever state actually changes (`set_maximized`,
+/// `update_activated`).
pub(crate) fn send_state(state: &mut CompState, id: WindowId) {
let Some(handles) = state.foreign_toplevel_handles.get(&id).cloned() else { return };
send_state_to(state, id, &handles);
diff --git a/crates/wayland/src/native_lock.rs b/crates/wayland/src/native_lock.rs
index 7ec3e9e..b5ff7c3 100644
--- a/crates/wayland/src/native_lock.rs
+++ b/crates/wayland/src/native_lock.rs
@@ -512,16 +512,16 @@ pub(crate) struct NativeLockFrame<'a> {
/// password box's drop shadow, the box itself, and the on-screen keyboard
/// - header/box/keyboard stacked and centered together via `lock_stack_
/// layout`, the same layout `CompState::native_lock_click` hit-tests
-/// against. Mirrors `lock::lock_render_elements`'s shape/signature so both
-/// backends can call whichever mode applies with the same pattern.
-/// Takes every buffer by reference rather than `&mut CompState`, same
-/// reasoning `lock::lock_render_elements`'s own doc comment gives for
-/// taking a bare surface instead: both backends' render loops call this
-/// while already holding a field-specific `&mut` borrow (`self.udev`/the
-/// winit backend's own renderer), not a whole-`self` one, so a caller has
-/// to extract every field of `NativeLockFrame` *before* that borrow
-/// starts (cheap `MemoryRenderBuffer` clones, not a deep pixel copy) and
-/// pass the clones in.
+/// against. Mirrors `lock::lock_render_elements`'s shape/signature so both
+/// backends can call whichever mode applies with the same pattern.
+/// Takes every buffer by reference rather than `&mut CompState`, same
+/// reasoning `lock::lock_render_elements`'s own doc comment gives for
+/// taking a bare surface instead: both backends' render loops call this
+/// while already holding a field-specific `&mut` borrow (`self.udev`/the
+/// winit backend's own renderer), not a whole-`self` one, so a caller has
+/// to extract every field of `NativeLockFrame` *before* that borrow
+/// starts (cheap `MemoryRenderBuffer` clones, not a deep pixel copy) and
+/// pass the clones in.
pub(crate) fn native_lock_render_elements<R>(frame: NativeLockFrame<'_>, output_size: (i32, i32), renderer: &mut R) -> Vec<MemoryRenderBufferRenderElement<R>>
where
R: Renderer + ImportAll + ImportMem,
diff --git a/crates/wayland/src/protocols/compositor.rs b/crates/wayland/src/protocols/compositor.rs
index cf5a048..496efa5 100644
--- a/crates/wayland/src/protocols/compositor.rs
+++ b/crates/wayland/src/protocols/compositor.rs
@@ -39,15 +39,15 @@ impl CompositorHandler for CompState {
///
/// Fixed by registering our own pre-commit hook here, in `new_surface`
/// - called at `wl_compositor.create_surface`, strictly before any
- /// later `get_layer_surface` on the same surface could register
- /// smithay's own hook. Hooks run in registration order (`tree.rs`:
- /// `pre_commit_hooks` is a plain `Vec`, pushed and iterated in order),
- /// so ours always runs first and can neutralize the stale reset state
- /// before smithay's hook ever inspects it. This depends on that
- /// ordering guarantee holding in future smithay versions - it isn't
- /// documented as an API contract, just an implementation detail
- /// confirmed against 0.7.0's source - so re-check this file against
- /// whatever smithay version replaces it.
+ /// later `get_layer_surface` on the same surface could register
+ /// smithay's own hook. Hooks run in registration order (`tree.rs`:
+ /// `pre_commit_hooks` is a plain `Vec`, pushed and iterated in order),
+ /// so ours always runs first and can neutralize the stale reset state
+ /// before smithay's hook ever inspects it. This depends on that
+ /// ordering guarantee holding in future smithay versions - it isn't
+ /// documented as an API contract, just an implementation detail
+ /// confirmed against 0.7.0's source - so re-check this file against
+ /// whatever smithay version replaces it.
///
/// Cost: one closure registered per `wl_surface` (not just layer
/// surfaces, since we don't know in advance which ones will become
diff --git a/crates/wayland/src/protocols/xdg_decoration.rs b/crates/wayland/src/protocols/xdg_decoration.rs
index c3c7f0b..99579a3 100644
--- a/crates/wayland/src/protocols/xdg_decoration.rs
+++ b/crates/wayland/src/protocols/xdg_decoration.rs
@@ -39,7 +39,7 @@ impl XdgDecorationHandler for CompState {
/// titlebar as before.
/// `theme.decorations.force_server_side` overrides the client's request
/// - see `ThemeConfig::force_server_side` for why that is allowed and
- /// why it is off by default.
+ /// why it is off by default.
fn request_mode(&mut self, toplevel: ToplevelSurface, mode: DecorationMode) {
let forced = self.wm.borrow().theme.force_server_side;
let mode = if forced { DecorationMode::ServerSide } else { mode };
diff --git a/crates/wayland/src/state/geometry.rs b/crates/wayland/src/state/geometry.rs
index 43e0f87..0a31e85 100644
--- a/crates/wayland/src/state/geometry.rs
+++ b/crates/wayland/src/state/geometry.rs
@@ -631,11 +631,11 @@ impl CompState {
/// Called from `CompositorHandler::commit`, right after `w.on_commit()`
/// - the first time a window still in `provisional_size` commits a
- /// real, non-empty buffer, adopts the client's own chosen content size
- /// into `Window::geometry` instead of leaving `add_window`'s guessed
- /// placeholder in place. A no-op once `provisional_size` no longer
- /// names this window (the ordinary case, checked first, so every other
- /// commit pays only one `HashSet` lookup).
+ /// real, non-empty buffer, adopts the client's own chosen content size
+ /// into `Window::geometry` instead of leaving `add_window`'s guessed
+ /// placeholder in place. A no-op once `provisional_size` no longer
+ /// names this window (the ordinary case, checked first, so every other
+ /// commit pays only one `HashSet` lookup).
///
/// Position is left exactly where `SmartPlacement` put it - only
/// clamped so a client that picked a bigger size than the guess can't
diff --git a/crates/wayland/src/state/layers.rs b/crates/wayland/src/state/layers.rs
index e9c8ac8..77469d8 100644
--- a/crates/wayland/src/state/layers.rs
+++ b/crates/wayland/src/state/layers.rs
@@ -19,12 +19,12 @@ impl CompState {
/// diff; this is the same fix for a client that hides by committing a
/// null buffer while keeping the `zwlr_layer_surface_v1` object alive
/// - cheaper than destroying and recreating it, and exactly what
- /// AGS's dock does to hide itself for a fullscreen window. Without
- /// this, the dock's last-requested exclusive zone stayed reserved the
- /// entire time it was hidden - a real, empty, unexplained band at the
- /// screen edge, reported live by an AGS peer session's own measurement
- /// across a genuine fullscreen toggle (the dock's zone correctly
- /// dropped to 0 on a real *maximize*, ruling that path out).
+ /// AGS's dock does to hide itself for a fullscreen window. Without
+ /// this, the dock's last-requested exclusive zone stayed reserved the
+ /// entire time it was hidden - a real, empty, unexplained band at the
+ /// screen edge, reported live by an AGS peer session's own measurement
+ /// across a genuine fullscreen toggle (the dock's zone correctly
+ /// dropped to 0 on a real *maximize*, ruling that path out).
///
/// `hidden_layer_surfaces` (see its own doc comment) is what makes the
/// reverse direction work: `unmap_layer` removes the surface from
diff --git a/crates/wayland/src/state/mod.rs b/crates/wayland/src/state/mod.rs
index 6382ee3..68f9079 100644
--- a/crates/wayland/src/state/mod.rs
+++ b/crates/wayland/src/state/mod.rs
@@ -129,13 +129,13 @@ pub(crate) struct DecorationSignature {
/// Which of *this* window's own titlebar buttons (if any) is currently
/// hovered, and the glyph-reveal animation's current progress (0..=255)
/// - see `CompState::hovered_titlebar_button`'s own doc comment.
- /// Included here, progress and all, so hovering (or un-hovering) a
- /// button - and every intermediate frame of the reveal animating in
- /// between - is a real signature change, not silently absorbed by the
- /// cache this struct exists to drive; a signature that only recorded
- /// *which* button was hovered, not the animation's own progress, would
- /// cache the very first frame of the reveal and never rebuild again
- /// for the rest of it.
+ /// Included here, progress and all, so hovering (or un-hovering) a
+ /// button - and every intermediate frame of the reveal animating in
+ /// between - is a real signature change, not silently absorbed by the
+ /// cache this struct exists to drive; a signature that only recorded
+ /// *which* button was hovered, not the animation's own progress, would
+ /// cache the very first frame of the reveal and never rebuild again
+ /// for the rest of it.
pub(crate) hovered_button: Option<(srdwm_core::TitlebarHit, u8)>,
/// `theme.title_centered` at the time this was rendered - a live
/// `srd`-side theme change (there's no `srd set` for this yet, but
@@ -153,8 +153,8 @@ pub(crate) struct DecorationSignature {
/// (`redraw_decoration_buffer`'s own call site) but were missing from
/// this struct entirely until a full-pipeline audit found the mismatch
/// - a live change to any of the three would have compared equal
- /// against a stale signature and silently never rebuilt the titlebar
- /// this window already has cached.
+ /// against a stale signature and silently never rebuilt the titlebar
+ /// this window already has cached.
pub(crate) button_glyph_always: bool,
pub(crate) button_order: Option<srdwm_core::ButtonOrder>,
pub(crate) traffic_light_buttons: bool,
@@ -510,8 +510,8 @@ pub(crate) struct CompState {
pub(crate) border_bottom_decorations: HashMap<WindowId, MemoryRenderBuffer>,
/// What `redraw_decoration_buffer` last actually rendered for a window
/// - every input its own rasterization reads (width, `decorated`,
- /// focus, title text, border colour/width) - so a call that would
- /// rebuild the exact same pixels can skip doing so instead.
+ /// focus, title text, border colour/width) - so a call that would
+ /// rebuild the exact same pixels can skip doing so instead.
///
/// Exists because `main.rs`'s `sync()` calls `Platform::redraw_
/// decoration` - which always reaches this - for *every visible
@@ -559,14 +559,14 @@ pub(crate) struct CompState {
/// A window's drop-shadow bitmap (`decoration::shadow_bitmap`), cached
/// the same way and at the same trigger points as `border_top_decorations`
/// - rebuilt only on creation or a real size change, not per frame, for
- /// the identical damage-tracking reason (a fresh `Id` every frame means
- /// `OutputDamageTracker` never finds a previous-frame match, so the
- /// shadow - like the border strips before this caching existed - would
- /// mark itself fully damaged forever, keeping the output page-flipping
- /// on an otherwise fully static screen). `None` for a maximized or
- /// fullscreen window, or with `general.shadows` off - see the render
- /// call site for why those don't get a shadow at all rather than a
- /// zero-alpha one.
+ /// the identical damage-tracking reason (a fresh `Id` every frame means
+ /// `OutputDamageTracker` never finds a previous-frame match, so the
+ /// shadow - like the border strips before this caching existed - would
+ /// mark itself fully damaged forever, keeping the output page-flipping
+ /// on an otherwise fully static screen). `None` for a maximized or
+ /// fullscreen window, or with `general.shadows` off - see the render
+ /// call site for why those don't get a shadow at all rather than a
+ /// zero-alpha one.
pub(crate) shadow_buffers: HashMap<WindowId, MemoryRenderBuffer>,
/// The compiled rounded-corner GLES shader program (`rounded_corners::
/// compile`), if that succeeded - `None` on the udev backend always
@@ -639,13 +639,13 @@ pub(crate) struct CompState {
/// Client-visible size (`geometry` minus the titlebar band, converted
/// to logical points for whichever monitor the window is currently on
/// - see `sync_geometry`'s own doc comment) last sent to each window
- /// via `xdg_toplevel.configure`. `sync_geometry` runs on
- /// every pointer-motion tick while a window is being dragged or resized
- /// (see `input::handle_pointer_position`); a plain move changes only
- /// position, not size, so without this it was re-sending a configure
- /// and re-rasterizing the titlebar's text from scratch on every single
- /// motion event of every drag, which is what made moving a window
- /// stutter. Only a real size change now does either.
+ /// via `xdg_toplevel.configure`. `sync_geometry` runs on
+ /// every pointer-motion tick while a window is being dragged or resized
+ /// (see `input::handle_pointer_position`); a plain move changes only
+ /// position, not size, so without this it was re-sending a configure
+ /// and re-rasterizing the titlebar's text from scratch on every single
+ /// motion event of every drag, which is what made moving a window
+ /// stutter. Only a real size change now does either.
pub(crate) last_synced_size: HashMap<WindowId, (i32, i32)>,
/// Windows whose `Window::size_is_provisional` was `true` at creation
/// and whose client hasn't sent a real, non-empty content commit yet --
diff --git a/crates/wayland/src/udev/gpu.rs b/crates/wayland/src/udev/gpu.rs
index ad6526e..f230f92 100644
--- a/crates/wayland/src/udev/gpu.rs
+++ b/crates/wayland/src/udev/gpu.rs
@@ -144,12 +144,12 @@ const COLOR_FORMATS: [DrmFourcc; 2] = [DrmFourcc::Argb8888, DrmFourcc::Xrgb8888]
/// here, matching the existing legacy path's own connector handling) is
/// *not* an atomic-vs-legacy switch, despite that being an easy assumption
/// - reading smithay's own source (`backend/drm/device/mod.rs`) directly
-/// showed `DrmDevice::create_internal` tries atomic capability first and
-/// falls back to a `Legacy` internal variant automatically if the driver
-/// doesn't support it, both exposed through the one `DrmDevice` type via
-/// its own `is_atomic()` query - logged here, not assumed, since Phase 1's
-/// probe never got far enough to find this out empirically on this
-/// specific machine's `i915` driver.
+/// showed `DrmDevice::create_internal` tries atomic capability first and
+/// falls back to a `Legacy` internal variant automatically if the driver
+/// doesn't support it, both exposed through the one `DrmDevice` type via
+/// its own `is_atomic()` query - logged here, not assumed, since Phase 1's
+/// probe never got far enough to find this out empirically on this
+/// specific machine's `i915` driver.
///
/// Deliberately does **not** yet call `initialize_output` for any specific
/// head, or touch `render_udev_frame` at all - this function's whole job
diff --git a/crates/wayland/src/udev/mod.rs b/crates/wayland/src/udev/mod.rs
index cae7177..61b7d29 100644
--- a/crates/wayland/src/udev/mod.rs
+++ b/crates/wayland/src/udev/mod.rs
@@ -190,14 +190,14 @@ pub(crate) struct UdevHead {
/// exact same head still "ready" and every prior damage still pending,
/// tried the exact same flip again, failed the exact same way, forever
/// - a true busy loop with no backoff at all, not merely a missed
- /// optimization. Confirmed live from a real session log: tens of
- /// thousands of consecutive `page flip failed: Device or resource
+ /// optimization. Confirmed live from a real session log: tens of
+ /// thousands of consecutive `page flip failed: Device or resource
/// busy` lines a few *microseconds* apart, the compositor's one thread
- /// spinning flat out on nothing else, which is what actually explains
- /// the user's report of losing pointer input and the ability to
- /// switch VTs at all after switching away and back once - not a
- /// separate input bug, this loop simply never yielded the CPU back to
- /// anything else, libinput's own event processing included.
+ /// spinning flat out on nothing else, which is what actually explains
+ /// the user's report of losing pointer input and the ability to
+ /// switch VTs at all after switching away and back once - not a
+ /// separate input bug, this loop simply never yielded the CPU back to
+ /// anything else, libinput's own event processing included.
pub(crate) flip_retry_after: Option<Instant>,
}
diff --git a/crates/wayland/src/udev/platform.rs b/crates/wayland/src/udev/platform.rs
index 45def0a..c400183 100644
--- a/crates/wayland/src/udev/platform.rs
+++ b/crates/wayland/src/udev/platform.rs
@@ -704,13 +704,13 @@ impl Platform for UdevPlatform {
/// One `srdwm_core::Monitor` per head, positioned in the global space
/// - or several, when `srd.monitor.split` has requested that head be
- /// divided into logical sub-monitors ("monitors inside monitors"; see
- /// `srdwm_core::monitor::MonitorSplit`'s own doc comment). This is
- /// what makes core's layout engine multi-monitor-aware in practice:
- /// `arrange_workspace` groups windows by `monitor` and lays each group
- /// out inside that monitor's rectangle - a split just means more,
- /// smaller rectangles feeding the same grouping, no other core-side
- /// change needed.
+ /// divided into logical sub-monitors ("monitors inside monitors"; see
+ /// `srdwm_core::monitor::MonitorSplit`'s own doc comment). This is
+ /// what makes core's layout engine multi-monitor-aware in practice:
+ /// `arrange_workspace` groups windows by `monitor` and lays each group
+ /// out inside that monitor's rectangle - a split just means more,
+ /// smaller rectangles feeding the same grouping, no other core-side
+ /// change needed.
fn monitors(&mut self) -> PlatformResult<Vec<srdwm_core::Monitor>> {
let Some(udev) = self.state.udev.as_ref() else { return Ok(Vec::new()) };
let wm = self.state.wm.clone();
diff --git a/crates/wayland/src/virtual_pointer.rs b/crates/wayland/src/virtual_pointer.rs
index 4808ed5..b306530 100644
--- a/crates/wayland/src/virtual_pointer.rs
+++ b/crates/wayland/src/virtual_pointer.rs
@@ -50,8 +50,8 @@
//! "degrade honestly" convention elsewhere (`monitor_layout::load`,
//! `icon_theme::find_icon`). Pinned motion (below) has no such limitation
//! - it never touches `udev`/`bounds()` at all, so it works identically
-//! on both backends, which is what makes the winit/nested backend a real
-//! place to validate it.
+//! on both backends, which is what makes the winit/nested backend a real
+//! place to validate it.
//!
//! **Phase 2 of this project's own multi-cursor plan** (see
//! `docs/TODO.md`'s "Multi-cursor Phase 2" entry for the full reasoning):
@@ -137,7 +137,7 @@ pub struct VirtualPointerData {
/// `DataInit::init` requires per-object user data to be `Send + Sync`
/// - `Dispatch::request` only ever hands out `&self`, not `&mut
/// self`, for the object the request arrived on, so interior
- /// mutability is unavoidable either way.
+ /// mutability is unavoidable either way.
pending_axis: Mutex<Option<AxisFrame>>,
/// Set by `CompState::set_virtual_pointer_pin` - see this module's
/// own doc comment for the full Phase 2 design. `Some(id)` routes
diff --git a/crates/wayland/src/winit/mod.rs b/crates/wayland/src/winit/mod.rs
index 5a08a9a..6a44ac8 100644
--- a/crates/wayland/src/winit/mod.rs
+++ b/crates/wayland/src/winit/mod.rs
@@ -86,8 +86,8 @@ pub struct WaylandPlatform {
/// Target frame budget for the winit (nested) backend's self-imposed pacing
/// - see `poll_events`' doc comment. 60fps to match `OutputMode`'s own
-/// `refresh: 60_000` a few lines below, not because either number is
-/// special.
+/// `refresh: 60_000` a few lines below, not because either number is
+/// special.
const TARGET_FRAME_TIME: Duration = Duration::from_micros(1_000_000 / 60);
diff --git a/crates/wayland/src/xwayland.rs b/crates/wayland/src/xwayland.rs
index 9fba4e5..40b664a 100644
--- a/crates/wayland/src/xwayland.rs
+++ b/crates/wayland/src/xwayland.rs
@@ -247,9 +247,9 @@ pub(crate) struct EwmhState {
/// `appmenu-gtk-module` shim case), these two together are already a
/// complete, unambiguous `com.canonical.dbusmenu` address on their own
/// - checked first in `read_global_menu`, before the GTK/Unity atoms,
- /// so a Qt app running under a KDE Plasma session (which sets these,
- /// never any `_GTK_*` atom) isn't rejected by `bus_name`'s hard
- /// requirement on `_GTK_UNIQUE_BUS_NAME` before ever reaching them.
+ /// so a Qt app running under a KDE Plasma session (which sets these,
+ /// never any `_GTK_*` atom) isn't rejected by `bus_name`'s hard
+ /// requirement on `_GTK_UNIQUE_BUS_NAME` before ever reaching them.
kde_appmenu_service_name: Option<u32>,
kde_appmenu_object_path: Option<u32>,
}
diff --git a/crates/x11/src/platform/trait_impl.rs b/crates/x11/src/platform/trait_impl.rs
index 6c68e9f..5e249cd 100644
--- a/crates/x11/src/platform/trait_impl.rs
+++ b/crates/x11/src/platform/trait_impl.rs
@@ -8,14 +8,14 @@ impl Platform for X11Platform {
/// Was `wait_for_event()` (blocks indefinitely for the first event,
/// only draining any backlog after that), which left `srd`'s IPC socket
/// - polled at the end of this method - unresponsive for as long as
- /// nothing happened on the X11 connection at all: no keypress, no mouse
- /// motion, nothing. A script sitting on `srd clients` while the user's
- /// hands were off the keyboard for a few seconds would just hang for
- /// exactly that long. Replaced with a bounded `poll(2)` on the
- /// connection's own fd (`~16ms`, matching the Wayland backends' own
- /// frame-ish cadence) so this method always returns roughly that often
- /// regardless of X11 activity, draining whatever's actually arrived
- /// (zero or more events) each time rather than requiring at least one.
+ /// nothing happened on the X11 connection at all: no keypress, no mouse
+ /// motion, nothing. A script sitting on `srd clients` while the user's
+ /// hands were off the keyboard for a few seconds would just hang for
+ /// exactly that long. Replaced with a bounded `poll(2)` on the
+ /// connection's own fd (`~16ms`, matching the Wayland backends' own
+ /// frame-ish cadence) so this method always returns roughly that often
+ /// regardless of X11 activity, draining whatever's actually arrived
+ /// (zero or more events) each time rather than requiring at least one.
fn poll_events(&mut self) -> PlatformResult<Vec<Event>> {
self.conn.flush().map_err(err)?;
let fd = self.conn.stream().as_raw_fd();