summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-05-10 21:19:14 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2021-05-10 21:19:14 +0100
commit69856a9aacfec7c23e9719228ba57664dbe69cdd (patch)
tree3ea1a1542ea100ae97ccf962c590e9ec8ddfc610 /gdk
parentc35a6725b99722d91b0ed6580546c27c8f0849ba (diff)
downloadgtk+-69856a9aacfec7c23e9719228ba57664dbe69cdd.tar.gz
x11: Don't update GLX visuals with EGL
We're going to get into a messy situation, with both GLX and EGL initialized. If we're already using EGL, skip the whole cache.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/x11/gdkglcontext-glx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index d9f9cf51d4..4181168262 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -1022,6 +1022,9 @@ gdk_x11_screen_update_visuals_for_glx (GdkX11Screen *x11_screen)
display_x11 = GDK_X11_DISPLAY (display);
dpy = gdk_x11_display_get_xdisplay (display);
+ if (display_x11->have_egl)
+ return;
+
/* We save the default visuals as a property on the root window to avoid
having to initialize GL each time, as it may not be used later. */
if (get_cached_gl_visuals (display, &system_visual_id, &rgba_visual_id))