window-actor/x11: Use g_clear_signal_handler()

Also fixes type of handler ID.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/734
This commit is contained in:
Jonas Ådahl 2019-08-16 21:09:18 +02:00
parent dcd0f4322a
commit f059466337

View File

@ -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);
}