Merge branch 'wip/nacho/associated-device' into 'master'

gdkdevice: use g_set_object to set the associated device

See merge request GNOME/gtk!3049
This commit is contained in:
Matthias Clasen 2021-01-07 21:08:46 +00:00
commit 526e24f5b1

View File

@ -611,17 +611,7 @@ _gdk_device_set_associated_device (GdkDevice *device,
g_return_if_fail (GDK_IS_DEVICE (device)); g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (associated == NULL || GDK_IS_DEVICE (associated)); g_return_if_fail (associated == NULL || GDK_IS_DEVICE (associated));
if (device->associated == associated) g_set_object (&device->associated, associated);
return;
if (device->associated)
{
g_object_unref (device->associated);
device->associated = NULL;
}
if (associated)
device->associated = g_object_ref (associated);
} }
/* /*