mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-03-31 01:50:35 +02:00
Merge branch 'ack-global-remove' into 'main'
Draft: xwayland: Add support for wl_fixes.ack_global_remove See merge request xorg/xserver!2140
This commit is contained in:
commit
ae6b77825b
4 changed files with 29 additions and 1 deletions
|
|
@ -3180,12 +3180,19 @@ 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, min(version, 2));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
||||
{
|
||||
struct xwl_screen *xwl_screen = data;
|
||||
|
||||
if (xwl_screen->input_fixes && wl_fixes_get_version(xwl_screen->input_fixes) >= WL_FIXES_ACK_GLOBAL_REMOVE_SINCE_VERSION)
|
||||
wl_fixes_ack_global_remove(xwl_screen->input_fixes, xwl_screen->input_registry, name);
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener input_listener = {
|
||||
|
|
|
|||
|
|
@ -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, min(version, 2));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -581,6 +597,9 @@ global_remove(void *data, struct wl_registry *registry, uint32_t name)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (xwl_screen->fixes && wl_fixes_get_version(xwl_screen->fixes) >= WL_FIXES_ACK_GLOBAL_REMOVE_SINCE_VERSION)
|
||||
wl_fixes_ack_global_remove(xwl_screen->fixes, registry, name);
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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.25.90'
|
||||
wayland_protocols_req = '>= 1.38'
|
||||
gbm_req = '>= 10.2'
|
||||
xf86dgaproto_req = '>= 2.0.99.1'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue