srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/core/src/manager/workspaces.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2024-08-09 09:36:00 +0200
committersrdusr <[email protected]>2024-08-09 09:36:00 +0200
commit31de54096243fb000fa6e7008a914861293482a5 (patch)
tree13ec4c5ae351994f35c90180e07988b5dffdb3f5 /crates/core/src/manager/workspaces.rs
parent52b0b8927fa56f42ad6b39fb45bbed5a2d392dce (diff)
downloadsrdwm-31de54096243fb000fa6e7008a914861293482a5.tar.gz
srdwm-31de54096243fb000fa6e7008a914861293482a5.zip
Fix a misleading workspace comment and drop four dead config keys
visible_windows' doc comment claimed windows show "on the active workspace of whichever monitor they're assigned to" - the code never reads w.monitor at all; current_workspace is one flat value shared by every monitor, not per-output. Documented that explicitly on both the field and the method, since this is a real behavioral difference from Hyprland worth a reader actually seeing, not just an inaccurate comment to fix quietly. monitor.primary_workspace/monitor.workspace_count describe a per- monitor-workspace design that doesn't exist; workspace.auto_switch/ workspace.persistent were never wired to any behavior. All four were seeded into default_config() and documented in DEFAULTS.md, so srd.set()/srd.get() on them silently succeeded while doing nothing -- removed from both, matching the precedent already set by general. rounded_corners' deliberate absence from default_config for a different reason (backend-dependent default rather than unbuilt).
Diffstat (limited to 'crates/core/src/manager/workspaces.rs')
-rw-r--r--crates/core/src/manager/workspaces.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/core/src/manager/workspaces.rs b/crates/core/src/manager/workspaces.rs
index 485ced0..6ffb21b 100644
--- a/crates/core/src/manager/workspaces.rs
+++ b/crates/core/src/manager/workspaces.rs
@@ -75,7 +75,12 @@ impl WindowManager {
}
/// Windows that should currently be shown to the user: those on the
- /// active workspace of whichever monitor they're assigned to, and not minimized.
+ /// current workspace, and not minimized.
+ ///
+ /// `current_workspace` is a single value shared by every monitor --
+ /// srdwm does not have Hyprland-style independent per-monitor
+ /// workspaces, so switching workspace changes what's shown on every
+ /// screen at once. `w.monitor` plays no part in this filter at all.
pub fn visible_windows(&self) -> impl Iterator<Item = &Window> {
self.windows.values().filter(|w| w.workspace == self.current_workspace && !w.minimized)
}