diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index d940d604b..789a61166 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -3179,6 +3179,9 @@ input_handler(void *data, struct wl_registry *registry, uint32_t id, init_keyboard_shortcuts_inhibit(xwl_screen, id, version); } else if (strcmp(interface, xdg_system_bell_v1_interface.name) == 0) { init_system_bell(xwl_screen, id, version); + } else if (strcmp(interface, wl_fixes_interface.name) == 0) { + xwl_screen->input_fixes = + wl_registry_bind(registry, id, &wl_fixes_interface, 1); } } diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 44e4a8055..890c1d819 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -271,6 +271,18 @@ xwl_close_screen(ScreenPtr screen) RemoveNotifyFd(xwl_screen->wayland_fd); + if (xwl_screen->fixes) { + wl_fixes_destroy_registry(xwl_screen->fixes, xwl_screen->registry); + wl_fixes_destroy(xwl_screen->fixes); + } + if (xwl_screen->input_fixes) { + wl_fixes_destroy_registry(xwl_screen->input_fixes, xwl_screen->input_registry); + wl_fixes_destroy(xwl_screen->input_fixes); + } + + wl_registry_destroy(xwl_screen->registry); + wl_registry_destroy(xwl_screen->input_registry); + wl_display_disconnect(xwl_screen->display); screen->CloseScreen = xwl_screen->CloseScreen; @@ -557,6 +569,10 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id, version); } #endif + else if (strcmp(interface, wl_fixes_interface.name) == 0) { + xwl_screen->fixes = + wl_registry_bind(registry, id, &wl_fixes_interface, 1); + } } static void diff --git a/hw/xwayland/xwayland-screen.h b/hw/xwayland/xwayland-screen.h index ffbaa09e7..cccd1750c 100644 --- a/hw/xwayland/xwayland-screen.h +++ b/hw/xwayland/xwayland-screen.h @@ -98,7 +98,9 @@ struct xwl_screen { int wayland_fd; struct wl_display *display; struct wl_registry *registry; + struct wl_fixes *fixes; struct wl_registry *input_registry; + struct wl_fixes *input_fixes; struct wl_compositor *compositor; struct zwp_tablet_manager_v2 *tablet_manager; struct wl_shm *shm; diff --git a/meson.build b/meson.build index 1da05c48b..560ca6f3e 100644 --- a/meson.build +++ b/meson.build @@ -66,7 +66,7 @@ libdrm_req = '>= 2.4.116' libselinux_req = '>= 2.0.86' xext_req = '>= 1.0.99.4' xproto_req = '>= 7.0.31' -wayland_req = '>= 1.21.0' +wayland_req = '>= 1.23.91' wayland_protocols_req = '>= 1.38' gbm_req = '>= 10.2' xf86dgaproto_req = '>= 2.0.99.1'