From d2f818b0f22136c7b125f3364728491f08848c72 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sun, 3 Mar 2024 16:40:18 +0100 Subject: [PATCH] xwm: use attention request when activating invisible windows --- src/xwayland/xwm.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xwayland/xwm.rs b/src/xwayland/xwm.rs index dd9e5be8..ba661c0e 100644 --- a/src/xwayland/xwm.rs +++ b/src/xwayland/xwm.rs @@ -2290,9 +2290,13 @@ impl Wm { Some(w) => w, _ => return Ok(()), }; - let seats = self.state.globals.seats.lock(); - for (_, seat) in seats.deref() { - seat.focus_toplevel(win.clone()); + if win.toplevel_data.visible.get() { + let seats = self.state.globals.seats.lock(); + for (_, seat) in seats.deref() { + seat.focus_toplevel(win.clone()); + } + } else { + win.x.surface.request_activation(); } Ok(()) }