From a93481092afc9f57fc10fdeb53047e70a34dc716 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Tue, 9 Aug 2022 02:01:15 -0400 Subject: [PATCH] Give input focus to globally active clients This technically violates the ICCCM, but the alternative is not much better: these windows *will* have focus in the GUI qube, so not giving them focus on the agent side will cause the X state to no longer be the same on both sides. Worse, such clients might not be expecting to lose focus without warning. Explicitly taking focus away from them might help. This is based on a similar commit in wlroots. --- gui-agent/vmside.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui-agent/vmside.c b/gui-agent/vmside.c index fd76f4db..09aa3207 100644 --- a/gui-agent/vmside.c +++ b/gui-agent/vmside.c @@ -1812,7 +1812,7 @@ static void handle_focus(Ghandles * g, XID winid) } // Give input focus only to window that set the input hint - if (input_hint) + if (input_hint || use_take_focus) XSetInputFocus(g->display, winid, RevertToParent, g->time); // Do not send take focus if the window doesn't support it