forked from AuroraMiddleware/gtk
Merge branch 'wip/carlosg/last-device-refcount' into 'gtk-3-24'
gdk: Keep a reference on the last source device See merge request GNOME/gtk!2510
This commit is contained in:
commit
4efd805110
@ -278,6 +278,7 @@ free_pointer_info (GdkPointerWindowInfo *info)
|
||||
{
|
||||
if (info->toplevel_under_pointer)
|
||||
g_object_unref (info->toplevel_under_pointer);
|
||||
g_clear_object (&info->last_slave);
|
||||
g_slice_free (GdkPointerWindowInfo, info);
|
||||
}
|
||||
|
||||
|
@ -9931,7 +9931,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
|
||||
|
||||
if (source_device != pointer_info->last_slave &&
|
||||
gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_SLAVE)
|
||||
pointer_info->last_slave = source_device;
|
||||
g_set_object (&pointer_info->last_slave, source_device);
|
||||
else if (pointer_info->last_slave)
|
||||
source_device = pointer_info->last_slave;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user