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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-06-06 16:21:24 -05:00
parent 5afe6c5b39
commit ae4209978c
1 changed files with 3 additions and 0 deletions

View File

@ -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 {