wayland: Trigger seat focus change on popup changes
Popups were missing the "input focus" unification in the pointer
seat, triggering MetaWaylandKeyboard focus changes underneath. On
one hand this missed moving all associated focus with it, on the
other hand this made keyboard and global input focus get out of
sync, and bring funky behavior like keyboard focus loss after
dismissing popups.
Fixes: 7b232d9f65
("wayland: Keep track of the "input focus" on MetaWaylandSeat")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3256
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3568>
This commit is contained in:
parent
c43f57f757
commit
0eb9c43908
@ -251,9 +251,7 @@ meta_wayland_popup_dismiss (MetaWaylandPopup *popup)
|
|||||||
|
|
||||||
top_popup_surface = meta_wayland_popup_grab_get_top_popup (popup_grab);
|
top_popup_surface = meta_wayland_popup_grab_get_top_popup (popup_grab);
|
||||||
seat = meta_wayland_pointer_get_seat (popup_grab->generic.pointer);
|
seat = meta_wayland_pointer_get_seat (popup_grab->generic.pointer);
|
||||||
|
meta_wayland_seat_set_input_focus (seat, top_popup_surface);
|
||||||
if (meta_wayland_seat_has_keyboard (seat))
|
|
||||||
meta_wayland_keyboard_set_focus (seat->keyboard, top_popup_surface);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,8 +281,7 @@ meta_wayland_popup_create (MetaWaylandPopupSurface *popup_surface,
|
|||||||
wl_list_insert (&grab->all_popups, &popup->link);
|
wl_list_insert (&grab->all_popups, &popup->link);
|
||||||
|
|
||||||
seat = meta_wayland_pointer_get_seat (grab->generic.pointer);
|
seat = meta_wayland_pointer_get_seat (grab->generic.pointer);
|
||||||
if (meta_wayland_seat_has_keyboard (seat))
|
meta_wayland_seat_set_input_focus (seat, surface);
|
||||||
meta_wayland_keyboard_set_focus (seat->keyboard, surface);
|
|
||||||
|
|
||||||
return popup;
|
return popup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user