mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 08:18:09 +02:00
shell: Always set focus when restoring focus state
To avoid having a surface on a hidden workspace in focus always set the focus (even to NULL) when restoring. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
9fa9b8b219
commit
568994400b
1 changed files with 5 additions and 3 deletions
|
|
@ -439,11 +439,13 @@ static void
|
|||
restore_focus_state(struct desktop_shell *shell, struct workspace *ws)
|
||||
{
|
||||
struct focus_state *state, *next;
|
||||
struct wl_surface *surface;
|
||||
|
||||
wl_list_for_each_safe(state, next, &ws->focus_list, link) {
|
||||
if (state->keyboard_focus)
|
||||
wl_keyboard_set_focus(state->seat->seat.keyboard,
|
||||
&state->keyboard_focus->surface);
|
||||
surface = state->keyboard_focus ?
|
||||
&state->keyboard_focus->surface : NULL;
|
||||
|
||||
wl_keyboard_set_focus(state->seat->seat.keyboard, surface);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue