mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
wayland: Ensure that _get_client_pointer returns a pointer
The previous implementation could return a device that is a keyboard.
This commit is contained in:
parent
77791f0708
commit
17d1c3c833
@ -1320,9 +1320,20 @@ static GdkDevice *
|
||||
gdk_device_manager_core_get_client_pointer (GdkDeviceManager *device_manager)
|
||||
{
|
||||
GdkDeviceManagerCore *device_manager_core;
|
||||
GList *l;
|
||||
|
||||
device_manager_core = (GdkDeviceManagerCore *) device_manager;
|
||||
return device_manager_core->devices->data;
|
||||
|
||||
/* Find the first pointer device */
|
||||
for (l = device_manager_core->devices; l != NULL; l = l->next)
|
||||
{
|
||||
GdkDevice *device = l->data;
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE)
|
||||
return device;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user