atagen

monolith

public
Star0
Watch0

Commit 3f3029bc63ef

tarball

atagen <boss@atagen.co>2026-10-19 08:55 UTC

1 file changed+3-1
activation: keep focus = false windows from taking focus by token

A launched client's xdg-activation request with a fresh token focused the window right after map_window had skipped it, so the focus = false rule never held for programs the user started from monolith. Such requests now mark the window urgent instead.
Modified file: crates/monolith/src/activation.rs+3 additions−1 deletions
@@ -60,7 +60,9 @@ impl XdgActivationHandler for State {
6060 self.wm.layout.relocate(id, ctx.output, ctx.tag);
6161 self.view_if_first(id);
6262 }
63- let may_focus = ctx.is_some_and(|c| c.may_focus) && data.timestamp.elapsed() < FRESH;
63+ let refused = self.wm.get(id).is_some_and(|w| w.rule.focus == Some(false));
64+ let may_focus =
65+ ctx.is_some_and(|c| c.may_focus) && data.timestamp.elapsed() < FRESH && !refused;
6466 if may_focus && self.wm.layout.visible(id) {
6567 self.wm.layout.focus(id);
6668 } else {