summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-05-24 01:56:35 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-05-28 20:25:17 +0000
commita3f127b0d0038ab30e3feadf048bbeaeee84fd4a (patch)
tree40a95e4a21acd1c7ae16670e10317df61a5a86aa /gdk
parent37f8df2722f5b0e348b3756c83bdb87e878d983d (diff)
downloadgtk+-a3f127b0d0038ab30e3feadf048bbeaeee84fd4a.tar.gz
surface: Give backends a chance to disconnect
Call the destroy vfunc before clearing frame clock and gl context, so backends have a chance to clean up.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdksurface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 16c3ed5e60..28f8f584e9 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -919,6 +919,8 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface,
display = gdk_surface_get_display (surface);
+ GDK_SURFACE_GET_CLASS (surface)->destroy (surface, foreign_destroy);
+
if (surface->gl_paint_context)
{
/* Make sure to destroy if current */
@@ -936,8 +938,6 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface,
_gdk_surface_clear_update_area (surface);
- GDK_SURFACE_GET_CLASS (surface)->destroy (surface, foreign_destroy);
-
surface->state |= GDK_SURFACE_STATE_WITHDRAWN;
surface->destroyed = TRUE;