[gtk+/wip/wayland-tablet-v2: 63/66] wayland: Support pad devices in gdk_wayland_device_get_node_path()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/wayland-tablet-v2: 63/66] wayland: Support pad devices in gdk_wayland_device_get_node_path()
- Date: Fri, 19 Aug 2016 13:08:32 +0000 (UTC)
commit c128d602dcd0db3508fe76714cb819c7165fe270
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 4 19:46:04 2016 +0200
wayland: Support pad devices in gdk_wayland_device_get_node_path()
We can return the node path on those too, so do that.
gdk/wayland/gdkdevice-wayland.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 4866f63..55ab628 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -5172,7 +5172,7 @@ gdk_wayland_device_get_drop_context (GdkDevice *device)
* will return %NULL.
*
* This is most notably implemented for devices of type
- * %GDK_SOURCE_PEN and %GDK_SOURCE_ERASER.
+ * %GDK_SOURCE_PEN, %GDK_SOURCE_ERASER and %GDK_SOURCE_TABLET_PAD.
*
* Returns: the /dev/input/event* path of this device
**/
@@ -5180,6 +5180,7 @@ const gchar *
gdk_wayland_device_get_node_path (GdkDevice *device)
{
GdkWaylandTabletData *tablet;
+ GdkWaylandTabletPadData *pad;
GdkSeat *seat;
@@ -5191,5 +5192,9 @@ gdk_wayland_device_get_node_path (GdkDevice *device)
if (tablet)
return tablet->path;
+ pad = gdk_wayland_device_manager_find_pad (GDK_WAYLAND_SEAT (seat), device);
+ if (pad)
+ return pad->path;
+
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]