[gtk/wip/matthiasc/popup5: 231/234] wayland: Disconnect the frame clock



commit a629bda28783c0a385f9608569fcbff02c10322f
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 24 10:59:38 2019 +0000

    wayland: Disconnect the frame clock
    
    The frame clock can survive the surface now,
    so we need to disconnect.

 gdk/wayland/gdksurface-wayland.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index f7bd5c9f9d..0d1f1ba584 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2819,6 +2819,7 @@ gdk_wayland_surface_destroy (GdkSurface *surface,
                              gboolean    foreign_destroy)
 {
   GdkWaylandDisplay *display;
+  GdkFrameClock *frame_clock;
 
   g_return_if_fail (GDK_IS_SURFACE (surface));
 
@@ -2829,6 +2830,10 @@ gdk_wayland_surface_destroy (GdkSurface *surface,
 
   gdk_wayland_surface_hide_surface (surface);
 
+  frame_clock = gdk_surface_get_frame_clock (surface);
+  g_signal_handlers_disconnect_by_func (frame_clock, on_frame_clock_before_paint, surface);
+  g_signal_handlers_disconnect_by_func (frame_clock, on_frame_clock_after_paint, surface);
+
   display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
   display->toplevels = g_list_remove (display->toplevels, surface);
 }


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