[gtk: 1/2] surface: Use correct display when destroying a surface for depth switch




commit cc02076b75115c799e029e5728e9fe65cab41ed0
Author: Sebastian Keller <skeller gnome org>
Date:   Tue Mar 22 08:11:18 2022 +0100

    surface: Use correct display when destroying a surface for depth switch
    
    When surface depth switches from non-high-depth to high-depth (or vice
    versa) the current surface has to be destroyed before a new one can be
    created for this window. eglDestroySurface however was getting passed a
    GdkDisplay, rather than the EGLDisplay it expects. As a result the old
    surface did not get destroyed and the new surface could not be created
    causing rendering to freeze.
    
    Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4773

 gdk/gdksurface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index ddfa767a99..16d668a931 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1125,7 +1125,7 @@ gdk_surface_ensure_egl_surface (GdkSurface *self,
       gdk_display_get_egl_config_high_depth (display) != gdk_display_get_egl_config (display))
     {
       gdk_gl_context_clear_current_if_surface (self);
-      eglDestroySurface (gdk_surface_get_display (self), priv->egl_surface);
+      eglDestroySurface (gdk_display_get_egl_display (display), priv->egl_surface);
       priv->egl_surface = NULL;
     }
 


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