mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
gdk: Avoid gdk_device_get_associated_device()
Query the seat for that.
This commit is contained in:
parent
4dc2ab61c9
commit
94982dbab7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user