[gtk/wip/otte/for-main: 2/2] glcontext: Don't spew warnings on surfaceless contexts




commit 5dc940ead2426fed6853351d14e3d9b99f4e999b
Author: Benjamin Otte <otte redhat com>
Date:   Thu Jan 6 19:23:29 2022 +0100

    glcontext: Don't spew warnings on surfaceless contexts
    
    Get the display directly instead of via the nonexisting surface.

 gdk/gdkglcontext.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 9ab690f6fa..7acbeafe68 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -185,8 +185,7 @@ gdk_gl_context_dispose (GObject *gobject)
 
   if (priv->egl_context != NULL)
     {
-      GdkSurface *surface = gdk_gl_context_get_surface (context);
-      GdkDisplay *display = gdk_surface_get_display (surface);
+      GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
       EGLDisplay *egl_display = gdk_display_get_egl_display (display);
 
       if (eglGetCurrentContext () == priv->egl_context)


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