xwayland: Introduce xwl_screen_lost_focus()

xwl_screen_lost_focus() calls the keyboard and pointer leave functions
for each seat.

No functional change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1213>
This commit is contained in:
Olivier Fourdan 2023-12-14 18:23:52 +01:00 committed by Marge Bot
parent 654c354da9
commit 122ad8a0de
2 changed files with 12 additions and 0 deletions

View File

@ -744,6 +744,17 @@ xwl_screen_get_next_output_serial(struct xwl_screen *xwl_screen)
return xwl_screen->output_name_serial++;
}
void
xwl_screen_lost_focus(struct xwl_screen *xwl_screen)
{
struct xwl_seat *xwl_seat;
xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) {
xwl_seat_leave_ptr(xwl_seat, TRUE);
xwl_seat_leave_kbd(xwl_seat);
}
}
Bool
xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
{

View File

@ -164,5 +164,6 @@ void xwl_surface_damage(struct xwl_screen *xwl_screen,
struct wl_surface *surface,
int32_t x, int32_t y, int32_t width, int32_t height);
int xwl_screen_get_next_output_serial(struct xwl_screen * xwl_screen);
void xwl_screen_lost_focus(struct xwl_screen *xwl_screen);
#endif /* XWAYLAND_SCREEN_H */