forked from AuroraMiddleware/gtk
wayland: ensure gdk_device_manager_get_client_pointer() returns a master pointer
The internal ordering of devices isn't quite guaranteed, so ensure we're returning the right one. https://bugzilla.gnome.org/show_bug.cgi?id=697855
This commit is contained in:
parent
dd464513a3
commit
001327d999
@ -1791,12 +1791,13 @@ gdk_wayland_device_manager_get_client_pointer (GdkDeviceManager *device_manager)
|
||||
|
||||
wayland_device_manager = (GdkWaylandDeviceManager *) device_manager;
|
||||
|
||||
/* Find the first pointer device */
|
||||
/* Find the first master pointer device */
|
||||
for (l = wayland_device_manager->devices; l != NULL; l = l->next)
|
||||
{
|
||||
GdkDevice *device = l->data;
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE)
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE &&
|
||||
gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER)
|
||||
return device;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user