From e4cd000cef3c1dde52da48ce1afde3f6ee918077 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 2 Apr 2014 11:38:21 -0400 Subject: [PATCH] wayland: Implement wl_seat v3 The new XWayland DDX flat out requires seat v3. --- src/wayland/meta-wayland-seat.c | 21 ++++++++++++++++++++- src/wayland/meta-wayland-versions.h | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index 2d5f0fbb9..f5e3867a4 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -115,8 +115,16 @@ pointer_set_cursor (struct wl_client *client, meta_wayland_seat_update_cursor_surface (seat); } +static void +pointer_release (struct wl_client *client, + struct wl_resource *resource) +{ + wl_resource_destroy (resource); +} + static const struct wl_pointer_interface pointer_interface = { - pointer_set_cursor + pointer_set_cursor, + pointer_release, }; static void @@ -137,6 +145,17 @@ seat_get_pointer (struct wl_client *client, meta_wayland_pointer_set_focus (&seat->pointer, seat->pointer.focus_surface); } +static void +keyboard_release (struct wl_client *client, + struct wl_resource *resource) +{ + wl_resource_destroy (resource); +} + +static const struct wl_keyboard_interface keyboard_interface = { + keyboard_release, +}; + static void seat_get_keyboard (struct wl_client *client, struct wl_resource *resource, diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index 17d8895eb..d599908fa 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -38,7 +38,7 @@ #define META_WL_COMPOSITOR_VERSION 3 #define META_WL_DATA_DEVICE_MANAGER_VERSION 1 #define META_WL_SHELL_VERSION 1 -#define META_WL_SEAT_VERSION 2 /* 3 not implemented yet */ +#define META_WL_SEAT_VERSION 3 #define META_WL_OUTPUT_VERSION 2 #define META_XSERVER_VERSION 1 #define META_GTK_SHELL_VERSION 1 @@ -49,8 +49,8 @@ #define META_WL_DATA_SOURCE_VERSION 1 /* from wl_data_device */ #define META_WL_DATA_DEVICE_VERSION 1 /* from wl_data_device_manager */ #define META_WL_SURFACE_VERSION 3 /* from wl_compositor */ -#define META_WL_POINTER_VERSION 2 /* from wl_seat; 3 not implemented yet */ -#define META_WL_KEYBOARD_VERSION 2 /* from wl_seat; 3 not implemented yet */ +#define META_WL_POINTER_VERSION 3 /* from wl_seat */ +#define META_WL_KEYBOARD_VERSION 3 /* from wl_seat */ #define META_WL_TOUCH_VERSION 0 /* from wl_seat; wl_touch not supported */ #define META_WL_REGION_VERSION 1 /* from wl_compositor */ #define META_XDG_SURFACE_VERSION 1 /* from xdg_shell */