From fea7ac84ee493ba17cd5a1a51dbd8cfc8692e4c3 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Thu, 8 Jan 2015 11:14:38 +0100 Subject: [PATCH] ui: Disable gdk's gl support This fixes a deadlock on wayland. --- src/ui/ui.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/ui.c b/src/ui/ui.c index 1e2d35007..b82fba1b1 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -48,11 +48,20 @@ struct _MetaUI void meta_ui_init (void) { + const char *gdk_gl_env = NULL; gdk_set_allowed_backends ("x11"); + gdk_gl_env = g_getenv ("GDK_GL"); + g_setenv("GDK_GL", "disable", TRUE); + if (!gtk_init_check (NULL, NULL)) meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL)); + if (gdk_gl_env) + g_setenv("GDK_GL", gdk_gl_env, TRUE); + else + unsetenv("GDK_GL"); + /* We need to be able to fully trust that the window and monitor sizes that Gdk reports corresponds to the X ones, so we disable the automatic scale handling */