srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'crates/wayland')
-rw-r--r--crates/wayland/src/elements.rs2
-rw-r--r--crates/wayland/src/gamma_control.rs2
-rw-r--r--crates/wayland/src/lib.rs2
-rw-r--r--crates/wayland/src/output_power.rs2
-rw-r--r--crates/wayland/src/protocols.rs2
-rw-r--r--crates/wayland/src/rounded_corners.rs8
-rw-r--r--crates/wayland/src/state/mod.rs2
-rw-r--r--crates/wayland/src/udev/platform.rs2
-rw-r--r--crates/wayland/src/udev/render.rs4
-rw-r--r--crates/wayland/src/winit/connect.rs4
-rw-r--r--crates/wayland/src/winit/events.rs2
-rw-r--r--crates/wayland/src/winit/platform.rs6
-rw-r--r--crates/wayland/src/winit/render.rs26
-rw-r--r--crates/wayland/src/xwayland.rs10
14 files changed, 37 insertions, 37 deletions
diff --git a/crates/wayland/src/elements.rs b/crates/wayland/src/elements.rs
index c8cb10c..f7f7484 100644
--- a/crates/wayland/src/elements.rs
+++ b/crates/wayland/src/elements.rs
@@ -157,7 +157,7 @@ where
/// `HashMap` lookup per frame.
///
/// Free function taking the two fields it needs directly, rather than a
-/// `CompState` method, so it can be called from inside `udev.rs`'s render
+/// `CompState` method, so it can be called from inside `udev/render.rs`'s
/// loop alongside the already-live `self.udev.as_mut()` borrow - see that
/// call site.
///
diff --git a/crates/wayland/src/gamma_control.rs b/crates/wayland/src/gamma_control.rs
index d126f26..78b8cd1 100644
--- a/crates/wayland/src/gamma_control.rs
+++ b/crates/wayland/src/gamma_control.rs
@@ -5,7 +5,7 @@
//! DRM/udev backend only: there is no real CRTC gamma table to adjust when
//! nested under a host compositor, same reasoning as `output_power.rs`. The
//! global is genuinely not created there (`CompState::_gamma_control_state`
-//! is `Option`, `None` for `winit.rs`) rather than advertised-and-always-
+//! is `Option`, `None` for `winit`) rather than advertised-and-always-
//! failing.
//!
//! No smithay helper exists for this protocol, so the `GlobalDispatch`/
diff --git a/crates/wayland/src/lib.rs b/crates/wayland/src/lib.rs
index 711006d..b218cf7 100644
--- a/crates/wayland/src/lib.rs
+++ b/crates/wayland/src/lib.rs
@@ -74,7 +74,7 @@ pub(crate) fn err(e: impl std::fmt::Display) -> PlatformError {
}
/// Connects to Wayland, choosing between the udev/DRM backend (bare TTY, no
-/// host compositor to nest under - see `udev.rs`) and this module's winit
+/// host compositor to nest under - see `udev`) and this module's winit
/// backend (nested window), the same way real compositors decide
/// nested-vs-native. Falls back to winit if udev initialization fails for
/// any reason (no seat access, no DRM device, ...), logging why rather than
diff --git a/crates/wayland/src/output_power.rs b/crates/wayland/src/output_power.rs
index e0734f8..298c59c 100644
--- a/crates/wayland/src/output_power.rs
+++ b/crates/wayland/src/output_power.rs
@@ -9,7 +9,7 @@
//! Neither protocol implies the other.
//!
//! DRM/udev backend only: there is no real display to power down when
-//! nested under a host compositor (`winit.rs`) - the host owns the actual
+//! nested under a host compositor (`winit`) - the host owns the actual
//! screen, and turning off the *nested window* makes no sense. The global
//! is simply never created there (`CompState::_output_power_state` is
//! `None`), so a client sees the protocol as genuinely unsupported rather
diff --git a/crates/wayland/src/protocols.rs b/crates/wayland/src/protocols.rs
index f680dc3..bf14d5b 100644
--- a/crates/wayland/src/protocols.rs
+++ b/crates/wayland/src/protocols.rs
@@ -644,7 +644,7 @@ impl WlrLayerShellHandler for CompState {
if let Some(layer) = found {
// Same zone-change recompute `ensure_layer_initial_configure`
// already does on every commit that changes a layer's
- // exclusive zone (state.rs) - but this is the *only* place
+ // exclusive zone (state/layers.rs) - but this is the *only* place
// that ever runs for a surface that goes away without one
// last commit. `unmap_layer` alone doesn't trigger it:
// reported live (by the AGS peer session) as a bar unmapping
diff --git a/crates/wayland/src/rounded_corners.rs b/crates/wayland/src/rounded_corners.rs
index 90f9afb..25fc199 100644
--- a/crates/wayland/src/rounded_corners.rs
+++ b/crates/wayland/src/rounded_corners.rs
@@ -26,7 +26,7 @@
//! subsurface tree through a shape mask is real additional work belonging
//! to a follow-up, not this pass. `elements::surface_content_elements`
//! (plain, unrounded, subsurface-aware) stays the fallback - see this
-//! module's own call site in `winit.rs`.
+//! module's own call site in `winit/render.rs`.
use smithay::backend::renderer::element::texture::TextureRenderElement;
use smithay::backend::renderer::element::Kind;
@@ -37,17 +37,17 @@ use smithay::backend::renderer::Renderer;
use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
use smithay::utils::Point;
-// `winit.rs`'s `custom_elements` element type. `crate::elements::
+// `winit/render.rs`'s `custom_elements` element type. `crate::elements::
// OverlayElement<GlesRenderer>` already covers everything the render loop
// draws (cursor, decoration, borders, popups, plain content, layer-shell
// surfaces) but can't also carry `TextureShaderElement`: that type only
// implements `RenderElement<GlesRenderer>`, not the generic `RenderElement<R>`
// every `OverlayElement<R>` variant needs (`OverlayElement<PixmanRenderer>`,
-// used identically by `udev.rs`, would stop compiling the moment a
+// used identically by `udev`, would stop compiling the moment a
// GLES-only variant were added to the shared enum). Wrapping the whole
// existing enum as one variant here, concrete to `GlesRenderer` from the
// start (`<=GlesRenderer>`, not `<R>`), sidesteps that without touching
-// the shared type at all - `udev.rs` never sees this module.
+// the shared type at all - `udev` never sees this module.
smithay::backend::renderer::element::render_elements! {
pub(crate) WinitElement<=GlesRenderer>;
Base=crate::elements::OverlayElement<GlesRenderer>,
diff --git a/crates/wayland/src/state/mod.rs b/crates/wayland/src/state/mod.rs
index 8d094b0..9e2c136 100644
--- a/crates/wayland/src/state/mod.rs
+++ b/crates/wayland/src/state/mod.rs
@@ -304,7 +304,7 @@ pub(crate) struct CompState {
/// The binding currently held down and repeating, if any.
pub(crate) repeat: Option<RepeatState>,
pub(crate) start_time: Instant,
- /// `Some` only for the udev/DRM backend; see `udev.rs` module docs for
+ /// `Some` only for the udev/DRM backend; see `udev/mod.rs` module docs for
/// why its runtime state lives here rather than on a separate struct.
pub(crate) udev: Option<udev::UdevState>,
/// XWayland support; see `xwayland.rs` module docs. `xwm` is `None`
diff --git a/crates/wayland/src/udev/platform.rs b/crates/wayland/src/udev/platform.rs
index eb04998..bf887b1 100644
--- a/crates/wayland/src/udev/platform.rs
+++ b/crates/wayland/src/udev/platform.rs
@@ -94,7 +94,7 @@ impl UdevPlatform {
variant: system_xkb.variant.as_deref().unwrap_or(""),
options: system_xkb.options.clone(),
};
- // 600ms delay, not 200 - see `state.rs`'s `REPEAT_DELAY` doc
+ // 600ms delay, not 200 - see `state/mod.rs`'s `REPEAT_DELAY` doc
// comment for why.
seat.add_keyboard(xkb_config, 600, 25).map_err(err)?;
seat.add_pointer();
diff --git a/crates/wayland/src/udev/render.rs b/crates/wayland/src/udev/render.rs
index d35834a..65c21dd 100644
--- a/crates/wayland/src/udev/render.rs
+++ b/crates/wayland/src/udev/render.rs
@@ -24,7 +24,7 @@ impl CompState {
// Rendered per window, front-to-back (topmost first), each window's
// content immediately followed by its decoration and border --
// fixes the same cross-window ordering bug documented in
- // `winit.rs`'s render loop: a background window's titlebar could
+ // `winit/render.rs`'s render loop: a background window's titlebar could
// otherwise show through in front of the actually-focused window on
// top of it, since decorations/borders used to be a single flat
// layer drawn unconditionally above *every* window's content
@@ -297,7 +297,7 @@ impl CompState {
if rounded_corners_enabled {
let epoch = self.content_epoch.get(&id).copied().unwrap_or(0);
// Bottom-only for a decorated window, same
- // reasoning as `winit.rs`'s identical split:
+ // reasoning as `winit/render.rs`'s identical split:
// the top two corners are already hidden
// under the titlebar band's own rounded
// bitmap.
diff --git a/crates/wayland/src/winit/connect.rs b/crates/wayland/src/winit/connect.rs
index f76d4ff..61f6dd1 100644
--- a/crates/wayland/src/winit/connect.rs
+++ b/crates/wayland/src/winit/connect.rs
@@ -59,7 +59,7 @@ impl WaylandPlatform {
variant: system_xkb.variant.as_deref().unwrap_or(""),
options: system_xkb.options.clone(),
};
- // 600ms delay, not 200 - see `state.rs`'s `REPEAT_DELAY` doc
+ // 600ms delay, not 200 - see `state/mod.rs`'s `REPEAT_DELAY` doc
// comment for why.
seat.add_keyboard(xkb_config, 600, 25).map_err(err)?;
seat.add_pointer();
@@ -74,7 +74,7 @@ impl WaylandPlatform {
let mut dmabuf_state = DmabufState::new();
dmabuf_state.create_global::<CompState>(&dh, backend.renderer().dmabuf_formats());
- // See `state.rs`'s `rounded_corners_program` doc comment: `None` on
+ // See `state/mod.rs`'s `rounded_corners_program` doc comment: `None` on
// any failure (an old/software GL driver missing something the
// shader needs) rather than refusing to start over a cosmetic
// feature - content just renders unrounded in that case.
diff --git a/crates/wayland/src/winit/events.rs b/crates/wayland/src/winit/events.rs
index 017b7d0..83183f2 100644
--- a/crates/wayland/src/winit/events.rs
+++ b/crates/wayland/src/winit/events.rs
@@ -18,7 +18,7 @@ pub(super) fn handle_winit_event(state: &mut CompState, output: &Output, event:
// This backend had no scroll handling at all - `InputEvent::
// PointerAxis` fell into the catch-all below and was silently
// dropped, unconditionally, on every device. Same forwarding as
- // `udev.rs`'s equivalent (see its own comment for the `stop()`/
+ // `udev/session.rs`'s equivalent (see its own comment for the `stop()`/
// `v120()` reasoning); duplicated rather than shared since the two
// backends' `InputEvent` generic parameters differ and there's no
// shared event type to write one function against.
diff --git a/crates/wayland/src/winit/platform.rs b/crates/wayland/src/winit/platform.rs
index eee42a9..e5b0b89 100644
--- a/crates/wayland/src/winit/platform.rs
+++ b/crates/wayland/src/winit/platform.rs
@@ -54,14 +54,14 @@ impl Platform for WaylandPlatform {
fn monitors(&mut self) -> PlatformResult<Vec<srdwm_core::Monitor>> {
// Shrunk by any layer-shell exclusive zone - see the matching
- // comment in `udev.rs`'s `monitors()`. This backend is always a
+ // comment in `udev/platform.rs`'s `monitors()`. This backend is always a
// single output at the global origin, so the output-local zone
// rectangle already is the usable global-space rect.
let zone = layer_map_for_output(&self.output).non_exclusive_zone();
Ok(vec![{
let rect = srdwm_core::Rect::new(zone.loc.x, zone.loc.y, zone.size.w as u32, zone.size.h as u32);
let mut m = srdwm_core::Monitor::new(0, "winit", rect);
- // Same fix as `udev.rs`'s matching function: `Monitor::new`
+ // Same fix as `udev/platform.rs`'s matching function: `Monitor::new`
// defaults `full_geometry` to `geometry`, which is already
// zone-shrunk here - without this, `toggle_fullscreen` had no
// way to actually cover a bar/dock's reserved strip, since the
@@ -84,7 +84,7 @@ impl Platform for WaylandPlatform {
Ok(())
}
- /// See `udev.rs`'s matching impl for why this has to go through
+ /// See `udev/platform.rs`'s matching impl for why this has to go through
/// `crate::input::focus_window` (the same path a real mouse click
/// already uses) rather than only touching core state.
fn focus(&mut self, window: WindowId) -> PlatformResult<()> {
diff --git a/crates/wayland/src/winit/render.rs b/crates/wayland/src/winit/render.rs
index 3dda278..902aed4 100644
--- a/crates/wayland/src/winit/render.rs
+++ b/crates/wayland/src/winit/render.rs
@@ -50,7 +50,7 @@ impl WaylandPlatform {
// The right-click titlebar menu, if open - pushed first so it's
// topmost over every window (this backend draws no cursor of its
// own, see this module's doc comment, so there's no "stay under
- // the pointer" ordering concern like udev.rs's matching push has).
+ // the pointer" ordering concern like udev/render.rs's matching push has).
if let (Some(menu), Some(buffer)) = (self.state.context_menu.as_ref(), self.state.context_menu_buffer.as_ref()) {
let pos = (menu.pos.0 as f64, menu.pos.1 as f64);
match MemoryRenderBufferRenderElement::from_buffer(renderer, pos, buffer, None, None, None, Kind::Unspecified) {
@@ -72,7 +72,7 @@ impl WaylandPlatform {
// instrumenting a locally vendored smithay copy directly) turned
// out to be `sync_geometry`'s `Space::map_element` call silently
// re-stacking windows to the top of `Space`'s *own* internal
- // order as a side effect of updating position - see `state.rs`'s
+ // order as a side effect of updating position - see `state/tick.rs`'s
// `resync_stacking_order` doc comment for the full story and the
// fix that landed for it (called after every `map_element` since).
// This loop never reads `Space`'s order at all: `ids` below comes
@@ -86,13 +86,13 @@ impl WaylandPlatform {
let ids: Vec<WindowId> = self.wm.borrow().visible_windows_front_to_back().map(|w| w.id).collect();
let focused = self.wm.borrow().focused_id();
// Popups next: always above every window's own content - see the
- // matching comment in `udev.rs`'s render loop for why this has to
+ // matching comment in `udev/render.rs`'s render loop for why this has to
// be pushed ahead of both the bar/dock and every window now that
// content shares this same list.
let popup_targets = crate::elements::popup_targets(&self.state);
custom_elements.extend(crate::elements::popup_render_elements(&popup_targets, renderer, (0, 0)).into_iter().map(crate::rounded_corners::WinitElement::Base));
// The bar/dock/launcher, skipped entirely for a fullscreen window --
- // see `udev.rs`'s matching push for the full reasoning.
+ // see `udev/render.rs`'s matching push for the full reasoning.
let hide_top_layers = self.wm.borrow().visible_windows_front_to_back().any(|w| w.fullscreen);
// `None` (the user's config never touched `general.rounded_corners`)
// defaults to *on* here - this backend has an actual GPU shader
@@ -111,7 +111,7 @@ impl WaylandPlatform {
// being built right now - `ids` is already front-to-back, so this
// only ever needs appending to, not recomputing. A window's own
// *content*, pushed inside this same loop below, needs no separate
- // occlusion test - see the matching comment in `udev.rs`'s render
+ // occlusion test - see the matching comment in `udev/render.rs`'s render
// loop for why ordinary front-to-back push order already occludes
// it correctly. The border strips and titlebar bitmap are
// different: outside `geometry`, so they still need `occluders`'
@@ -121,11 +121,11 @@ impl WaylandPlatform {
let Some(w) = self.wm.borrow().window(id).cloned() else { continue };
// `w.geometry` is the animation's target, not necessarily where
// the window is actually drawn this frame - see the matching
- // comment in `udev.rs`'s render loop for the full story
+ // comment in `udev/render.rs`'s render loop for the full story
// (reported live as the border "not flush" with the window
// during an animated maximize/fullscreen/open-slide transition).
let geom = self.state.window_anims.get(&id).map(crate::state::WindowAnim::current_rect).unwrap_or(w.geometry);
- // Same reasoning as udev.rs's matching push: positioned from
+ // Same reasoning as udev/render.rs's matching push: positioned from
// `geom`, not `w.geometry`, and not fragment-clipped against
// `occluders` - see that comment.
if let Some(shadow) = self.state.shadow_buffers.get(&id) {
@@ -137,7 +137,7 @@ impl WaylandPlatform {
}
}
if let Some(deco) = self.state.decorations.get(&id) {
- // Fragment-clipped, same as udev.rs's matching titlebar
+ // Fragment-clipped, same as udev/render.rs's matching titlebar
// push - see that comment for why all-or-nothing (skip
// only once *fully* covered) wasn't enough: a titlebar
// only partially covered, the common case for cascaded
@@ -172,7 +172,7 @@ impl WaylandPlatform {
// why a per-frame rebuild of either was a real, continuous
// cost, not a cosmetic one. Not fragment-clipped like the
// other three below - see the matching comment in
- // `udev.rs` for why the top strip only gets the cheaper
+ // `udev/render.rs` for why the top strip only gets the cheaper
// all-or-nothing occlusion check.
if strips[0].width > 0 && strips[0].height > 0 && !strips[0].subtract_all(&occluders).is_empty() {
if let Some(buffer) = self.state.border_top_decorations.get(&id) {
@@ -196,9 +196,9 @@ impl WaylandPlatform {
}
}
// The window's own content, at its own `opacity` - see the
- // matching push in `udev.rs`'s render loop for why. Single
+ // matching push in `udev/render.rs`'s render loop for why. Single
// output at the global origin, so no offset to subtract (see
- // `elements.rs`'s doc comment on why `udev.rs`'s per-head call
+ // `elements.rs`'s doc comment on why `udev/render.rs`'s per-head call
// does). Rounded via `rounded_corners::rounded_content_element`
// when the feature's on and the shader compiled - a decorated
// window only rounds its bottom two corners (the top two are
@@ -235,7 +235,7 @@ impl WaylandPlatform {
.map(crate::rounded_corners::WinitElement::Base),
);
- // Not `smithay::desktop::space::render_output`: see `udev.rs`'s
+ // Not `smithay::desktop::space::render_output`: see `udev/render.rs`'s
// matching call site for why (per-window opacity, fullscreen-aware
// layer-shell inclusion - `custom_elements` above already carries
// everything that wrapper would have built).
@@ -293,7 +293,7 @@ impl WaylandPlatform {
}
// Layer-shell surfaces get their callback every pass, unconditionally
// - NOT folded into the `has_damage` gate above. See the matching
- // (much longer) comment in udev.rs's `render_udev_frame`: many
+ // (much longer) comment in udev/render.rs's `render_udev_frame`: many
// layer-shell clients (GTK4/AGS among them) drive their entire
// repaint loop off frame callbacks with no independent timer
// fallback, so withholding the callback until *something* on the
diff --git a/crates/wayland/src/xwayland.rs b/crates/wayland/src/xwayland.rs
index f18a485..d0d9641 100644
--- a/crates/wayland/src/xwayland.rs
+++ b/crates/wayland/src/xwayland.rs
@@ -3,7 +3,7 @@
//! bridged into the same `srdwm_core::WindowManager`/`Space` pipeline as
//! native `xdg-shell` windows.
//!
-//! Only wired up for the udev/DRM backend (`udev.rs`) for now: XWayland's
+//! Only wired up for the udev/DRM backend (`udev`) for now: XWayland's
//! window-manager side (`X11Wm::start_wm`) is driven entirely through a
//! `calloop` event loop, which only the udev backend has - the nested
//! winit backend still drives its own manual poll loop (see `lib.rs`'s
@@ -42,7 +42,7 @@ pub(crate) type X11Window = smithay::xwayland::xwm::X11Window;
/// `X11Wm` on disconnect) is what shuts things down.
///
/// Before spawning, arranges for XWayland to run with `-shm`: this
-/// compositor only ever supports `wl_shm` (see `udev.rs`'s module docs on
+/// compositor only ever supports `wl_shm` (see `udev/mod.rs`'s module docs on
/// why it's deliberately software-only, no GBM/DMA-BUF), and XWayland's
/// default behavior of trying `glamor` first and falling back to
/// shared-memory buffers on failure does *not* fall back to the
@@ -493,7 +493,7 @@ impl CompState {
// report) `_NET_ACTIVE_WINDOW` never updates either, since this is
// `set_keyboard_focus`'s only caller for X11 windows and that's the
// sole place `_NET_ACTIVE_WINDOW` gets written. The xdg-shell path
- // (`new_managed_window` in state.rs) already does this; this is the
+ // (`new_managed_window` in state/lifecycle.rs) already does this; this is the
// equivalent X11 creation path, which never got the same fix.
self.set_keyboard_focus(Some(wl_surface));
self.pending.borrow_mut().push(CoreEvent::WindowCreated(id));
@@ -507,7 +507,7 @@ impl CompState {
self.space.unmap_elem(&w);
}
self.decorations.remove(&id);
- // Same reason as `state.rs`'s native `remove_window`: don't leave
+ // Same reason as `state/lifecycle.rs`'s native `remove_window`: don't leave
// the context menu open against a window that's about to stop
// existing.
if self.context_menu.as_ref().is_some_and(|m| m.window == id) {
@@ -516,7 +516,7 @@ impl CompState {
self.wm.borrow_mut().remove_window(id);
self.pending.borrow_mut().push(CoreEvent::WindowDestroyed(id));
crate::foreign_toplevel::window_closed(self, id);
- // Same reason as the equivalent call in `state.rs`'s native
+ // Same reason as the equivalent call in `state/lifecycle.rs`'s native
// `remove_window`: core may have already moved focus to whatever's
// now on top, and the Wayland/X11 side needs to be told to follow.
crate::input::sync_keyboard_focus(self);