[mutter] window-actor/x11: Use g_clear_signal_handler()



commit f059466337faf482a6f86010887b234f2a4baf1c
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Aug 16 21:09:18 2019 +0200

    window-actor/x11: Use g_clear_signal_handler()
    
    Also fixes type of handler ID.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/734

 src/compositor/meta-window-actor-x11.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index a82b923f3..7902d7a1c 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -44,7 +44,7 @@ struct _MetaWindowActorX11
   guint send_frame_messages_timer;
   int64_t frame_drawn_time;
 
-  guint repaint_scheduled_id;
+  gulong repaint_scheduled_id;
 
   /* If set, the client needs to be sent a _NET_WM_FRAME_DRAWN
    * client message for one or more messages in ->frames */
@@ -500,11 +500,7 @@ meta_window_actor_x11_dispose (GObject *object)
 
   surface_actor = meta_window_actor_get_surface (META_WINDOW_ACTOR (actor_x11));
   if (surface_actor)
-    {
-      g_signal_handler_disconnect (surface_actor,
-                                   actor_x11->repaint_scheduled_id);
-      actor_x11->repaint_scheduled_id = 0;
-    }
+    g_clear_signal_handler (&actor_x11->repaint_scheduled_id, surface_actor);
 
   G_OBJECT_CLASS (meta_window_actor_x11_parent_class)->dispose (object);
 }


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