[gtk/wip/matthiasc/popup5: 130/152] surface: Don't dispose the frame clock prematurely
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 130/152] surface: Don't dispose the frame clock prematurely
- Date: Sun, 26 May 2019 05:30:31 +0000 (UTC)
commit dc3aba20b85bcb6fb2e1aa8e651863fe89a31ed1
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]