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
@ -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…
Reference in New Issue
Block a user