xwayland: better support for keyboard focus grabs

Use the new grab_focus signal as a more reliable way to tell when an
unmanaged (override-redirect) surface wants focus.
This commit is contained in:
John Lindgren 2024-02-13 22:25:20 -05:00 committed by Consolatis
parent c00baa1651
commit 423cb6923f
2 changed files with 29 additions and 3 deletions

View file

@ -47,12 +47,20 @@ struct xwayland_unmanaged {
struct wl_listener associate;
struct wl_listener dissociate;
struct wl_listener grab_focus;
struct wl_listener request_activate;
struct wl_listener request_configure;
/* struct wl_listener request_fullscreen; */
struct wl_listener set_geometry;
struct wl_listener destroy;
struct wl_listener set_override_redirect;
/*
* True if the surface has performed a keyboard grab. labwc
* honors keyboard grabs and will give the surface focus when
* it's mapped (which may occur slightly later) and on top.
*/
bool ever_grabbed_focus;
};
struct xwayland_view {