gdkseatdefault: Unref removed slave devices

Adding a slave device adds a ref, but removing it does not unref it.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1359
This commit is contained in:
Sebastian Keller 2020-01-27 00:59:56 +01:00
parent 9a65e05748
commit 4cef9f3471

View File

@ -396,6 +396,7 @@ gdk_seat_default_remove_slave (GdkSeatDefault *seat,
priv->capabilities |= device_get_capability (GDK_DEVICE (l->data));
gdk_seat_device_removed (GDK_SEAT (seat), device);
g_object_unref (device);
}
else if (g_list_find (priv->slave_keyboards, device))
{
@ -405,6 +406,7 @@ gdk_seat_default_remove_slave (GdkSeatDefault *seat,
priv->capabilities &= ~GDK_SEAT_CAPABILITY_KEYBOARD;
gdk_seat_device_removed (GDK_SEAT (seat), device);
g_object_unref (device);
}
}