Commit 94982dba authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

gdk: Avoid gdk_device_get_associated_device()

Query the seat for that.
parent 4dc2ab61
......@@ -816,9 +816,15 @@ _gdk_display_get_pointer_info (GdkDisplay *display,
GdkDevice *device)
{
GdkPointerSurfaceInfo *info;
GdkSeat *seat;
if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
device = gdk_device_get_associated_device (device);
if (device)
{
seat = gdk_device_get_seat (device);
if (device == gdk_seat_get_keyboard (seat))
device = gdk_seat_get_pointer (seat);
}
if (G_UNLIKELY (!device))
return NULL;
......
......@@ -1807,7 +1807,7 @@ gdk_surface_set_cursor (GdkSurface *surface,
devices = gdk_seat_get_physical_devices (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS);
for (d = devices; d; d = d->next)
{
device = gdk_device_get_associated_device (d->data);
device = d->data;
gdk_surface_set_cursor_internal (surface, device, surface->cursor);
}
g_list_free (devices);
......
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