[gtk/wip/matthiasc/popup5: 122/145] surface: Don't dispose the frame clock prematurely



commit 02a658ec812b97190d44196902eb995b10fe8e61
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 20 13:19:12 2019 +0000

    surface: Don't dispose the frame clock prematurely
    
    Since we are now sharing frame clocks with multiple
    surfaces, we can no longer dispose them unconditionally
    when a surface goes away. Only do it if we are a
    toplevel (without parent).
    
    This was showing up as criticals on exit when opening
    and closing any popover in widget factory.

 gdk/gdksurface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 87bea23ee1..8a610e18fd 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -893,7 +893,8 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface,
 
   if (surface->frame_clock)
     {
-      g_object_run_dispose (G_OBJECT (surface->frame_clock));
+      if (surface->parent == NULL)
+        g_object_run_dispose (G_OBJECT (surface->frame_clock));
       gdk_surface_set_frame_clock (surface, NULL);
     }
 


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