aboutsummaryrefslogtreecommitdiff
path: root/src/layout/workspace.rs
diff options
context:
space:
mode:
authorFluxTape <fluxtape.contact@gmail.com>2024-11-29 06:46:13 +0100
committerGitHub <noreply@github.com>2024-11-29 08:46:13 +0300
commit11f351dbeb937a7de1de2f15b08c81f3682e423b (patch)
treee44953e06d4c13cb319f172ff4b1b54c72abb43d /src/layout/workspace.rs
parent815fa379ea1ba2ed9c9efff94e0b48374185f5de (diff)
downloadniri-11f351dbeb937a7de1de2f15b08c81f3682e423b.tar.gz
niri-11f351dbeb937a7de1de2f15b08c81f3682e423b.tar.bz2
niri-11f351dbeb937a7de1de2f15b08c81f3682e423b.zip
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 <yalterz@gmail.com>
Diffstat (limited to 'src/layout/workspace.rs')
-rw-r--r--src/layout/workspace.rs4
1 files changed, 4 insertions, 0 deletions
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<W: LayoutElement> Workspace<W> {
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
}