aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/mod.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs
index 1f790f16..1204ff5b 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -1971,6 +1971,37 @@ impl State {
self.niri.queue_redraw_all();
}
}
+ Action::ToggleUrgent(id) => {
+ let window = self
+ .niri
+ .layout
+ .workspaces_mut()
+ .find_map(|ws| ws.windows_mut().find(|w| w.id().get() == id));
+ if let Some(window) = window {
+ let urgent = window.is_urgent();
+ window.set_urgent(!urgent);
+ }
+ }
+ Action::SetUrgent(id) => {
+ let window = self
+ .niri
+ .layout
+ .workspaces_mut()
+ .find_map(|ws| ws.windows_mut().find(|w| w.id().get() == id));
+ if let Some(window) = window {
+ window.set_urgent(true);
+ }
+ }
+ Action::UnsetUrgent(id) => {
+ let window = self
+ .niri
+ .layout
+ .workspaces_mut()
+ .find_map(|ws| ws.windows_mut().find(|w| w.id().get() == id));
+ if let Some(window) = window {
+ window.set_urgent(false);
+ }
+ }
}
}