Commit 3ac56e60 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

wayland: Add wayland-specific method to retrieve a device node path

This will be useful at least for g-c-c, in order to match libwacom
data with GdkDevices.
parent 942d144d
......@@ -4478,3 +4478,35 @@ gdk_wayland_device_get_drop_context (GdkDevice *device)
return GDK_WAYLAND_SEAT (seat)->drop_context;
* gdk_wayland_device_get_node_path:
* @device: a #GdkDevice
* Returns the /dev/input/event* path of this device.
* For #GdkDevices that possibly coalesce multiple hardware
* devices (eg. mouse, keyboard, touch,...), this function
* will return %NULL.
* This is most notably implemented for devices of type
* Returns: the /dev/input/event* path of this device
const gchar *
gdk_wayland_device_get_node_path (GdkDevice *device)
GdkWaylandTabletData *tablet;
GdkSeat *seat;
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
seat = gdk_device_get_seat (device);
tablet = gdk_wayland_device_manager_find_tablet (GDK_WAYLAND_SEAT (seat),
if (tablet)
return tablet->path;
return NULL;
......@@ -55,6 +55,8 @@ struct wl_keyboard *gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
struct wl_seat *gdk_wayland_seat_get_wl_seat (GdkSeat *seat);
const gchar *gdk_wayland_device_get_node_path (GdkDevice *device);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment