[gtk+] wayland: Get the data device during input device setup
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Get the data device during input device setup
- Date: Wed, 14 Dec 2011 14:47:13 +0000 (UTC)
commit b165c1bac8a99df640ffad1ebe6380f89886b438
Author: Rob Bradford <rob linux intel com>
Date: Mon Dec 12 14:26:27 2011 +0000
wayland: Get the data device during input device setup
The data device is a associated with the input device - fetch the data device
from the data manager for the current input device.
gdk/wayland/gdkdevice-wayland.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 806c568..8b159ab 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -52,6 +52,7 @@ struct _GdkWaylandDevice
GdkWindow *pointer_focus;
GdkWindow *keyboard_focus;
struct wl_input_device *device;
+ struct wl_data_device *data_device;
int32_t x, y, surface_x, surface_y;
uint32_t time;
};
@@ -600,12 +601,14 @@ _gdk_wayland_device_manager_add_device (GdkDeviceManager *device_manager,
struct wl_input_device *wl_device)
{
GdkDisplay *display;
+ GdkDisplayWayland *display_wayland;
GdkDeviceManagerCore *device_manager_core =
GDK_DEVICE_MANAGER_CORE(device_manager);
GdkWaylandDevice *device;
device = g_new0 (GdkWaylandDevice, 1);
display = gdk_device_manager_get_display (device_manager);
+ display_wayland = GDK_DISPLAY_WAYLAND (display);
device->display = display;
device->pointer = g_object_new (GDK_TYPE_DEVICE_CORE,
@@ -635,6 +638,10 @@ _gdk_wayland_device_manager_add_device (GdkDeviceManager *device_manager,
wl_input_device_add_listener(device->device,
&input_device_listener, device);
+ device->data_device =
+ wl_data_device_manager_get_data_device (display_wayland->data_device_manager,
+ device->device);
+
device_manager_core->devices =
g_list_prepend (device_manager_core->devices, device->keyboard);
device_manager_core->devices =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]