From ae4209978c2130a1a937e408fa84f0417f59d14b Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 6 Jun 2022 16:21:24 -0500 Subject: [PATCH] xwayland: Don't focus an already focused xwayland window We've been doing this when clicking on windows, even if they're already activated. This leads to sending extra WM_TAKE_FOCUS events as well as re-rendering the decor every mouse click. Signed-off-by: Derek Foreman --- xwayland/window-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 7cadffdd..50380562 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -980,6 +980,9 @@ weston_wm_window_activate(struct wl_listener *listener, void *data) window = get_wm_window(surface); } + if (wm->focus_window == window) + return; + if (window) { weston_wm_set_net_active_window(wm, window->id); } else {