mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Add is-urgent window rule matcher
This commit is contained in:
@@ -520,6 +520,7 @@ impl Mapped {
|
||||
if self.is_focused && urgent {
|
||||
return;
|
||||
}
|
||||
|
||||
let changed = self.is_urgent != urgent;
|
||||
self.is_urgent = urgent;
|
||||
self.need_to_recompute_rules |= changed;
|
||||
|
||||
@@ -440,6 +440,12 @@ fn window_matches(window: WindowRef, role: &XdgToplevelSurfaceRoleAttributes, m:
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(is_urgent) = m.is_urgent {
|
||||
if window.is_urgent() != is_urgent {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(is_active) = m.is_active {
|
||||
// Our "is-active" definition corresponds to the window having a pending Activated state.
|
||||
let pending_activated = server_pending
|
||||
|
||||
Reference in New Issue
Block a user