[gtk/wip/matthiasc/popup5: 135/151] surface: Give backends a chance to disconnect



commit a3f127b0d0038ab30e3feadf048bbeaeee84fd4a
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 24 01:56:35 2019 +0000

    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.

 gdk/gdksurface.c | 4 ++--
 1 file 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;
 


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