diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 991effe5c..e1fefae1e 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -5156,6 +5156,7 @@ activate_binding(struct weston_seat *seat, struct desktop_shell *shell, struct weston_view *focus_view) { + struct focus_state *state; struct weston_surface *focus; struct weston_surface *main_surface; @@ -5168,6 +5169,13 @@ activate_binding(struct weston_seat *seat, if (get_shell_surface_type(main_surface) == SHELL_SURFACE_NONE) return; + state = ensure_focus_state(shell, seat); + if (state == NULL) + return; + + if (state->keyboard_focus == focus) + return; + activate(shell, focus, seat, true); }