From f2f9ed1b3f9c49b323ce591eb72a406058d324a4 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 30 Aug 2026 20:41:00 +0200 Subject: Indent doc list continuations --- crates/wayland/src/cursor.rs | 6 +-- crates/wayland/src/decoration/border.rs | 8 ++-- crates/wayland/src/decoration/buttons.rs | 2 +- crates/wayland/src/decoration/corners.rs | 14 +++---- crates/wayland/src/decoration/shadow.rs | 2 +- crates/wayland/src/desktop_icons.rs | 6 +-- crates/wayland/src/elements.rs | 30 +++++++-------- crates/wayland/src/foreign_toplevel.rs | 4 +- crates/wayland/src/native_lock.rs | 20 +++++----- crates/wayland/src/protocols/compositor.rs | 18 ++++----- crates/wayland/src/protocols/xdg_decoration.rs | 2 +- crates/wayland/src/state/geometry.rs | 10 ++--- crates/wayland/src/state/layers.rs | 12 +++--- crates/wayland/src/state/mod.rs | 52 +++++++++++++------------- crates/wayland/src/udev/gpu.rs | 12 +++--- crates/wayland/src/udev/mod.rs | 14 +++---- crates/wayland/src/udev/platform.rs | 14 +++---- crates/wayland/src/virtual_pointer.rs | 6 +-- crates/wayland/src/winit/mod.rs | 4 +- crates/wayland/src/xwayland.rs | 6 +-- 20 files changed, 121 insertions(+), 121 deletions(-) (limited to 'crates/wayland') 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 { 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) - /// 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, damage: &'a [Rectangle], 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(frame: NativeLockFrame<'_>, output_size: (i32, i32), renderer: &mut R) -> Vec> 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, pub(crate) traffic_light_buttons: bool, @@ -510,8 +510,8 @@ pub(crate) struct CompState { pub(crate) border_bottom_decorations: HashMap, /// 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, /// 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, /// 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, } 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> { 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>, /// 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, kde_appmenu_object_path: Option, } -- cgit v1.2.3