[gtk/gtk-3-24: 1/3] gdkseatdefault: Unref removed slave devices



commit 4cef9f34713d20d7d87c4485a789816325ddb80a
Author: Sebastian Keller <skeller gnome org>
Date:   Mon Jan 27 00:59:56 2020 +0100

    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

 gdk/gdkseatdefault.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c
index a83901a692..98ea6335fa 100644
--- a/gdk/gdkseatdefault.c
+++ b/gdk/gdkseatdefault.c
@@ -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);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]