From 11f351dbeb937a7de1de2f15b08c81f3682e423b Mon Sep 17 00:00:00 2001 From: FluxTape Date: Fri, 29 Nov 2024 06:46:13 +0100 Subject: Implement empty-workspace-above-first (#745) * Implement empty-workspace-above-first option * add two failing tests * fix interactive_move_onto_empty_output_ewaf and interactive_move_onto_first_empty_workspace tests * Add two failing ewaf option toggle tests * Fix adding/removing first empty workspace on option toggle * Don't remove first empty workspace if focused * Stop workspace switch when enabling ewaf * layout/monitor: Offset workspace switch on adding workspace above * Fix some initial active workspace ids with ewaf * wiki: Document empty-workspace-above-first --------- Co-authored-by: Ivan Molodetskikh --- src/layout/workspace.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/layout/workspace.rs') diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 2b3a462c..45aaf8ba 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -567,6 +567,10 @@ impl Workspace { self.name = None; } + pub fn has_windows_or_name(&self) -> bool { + self.has_windows() || self.name.is_some() + } + pub fn scale(&self) -> smithay::output::Scale { self.scale } -- cgit