From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFgPo-0004Mm-J0 for qemu-devel@nongnu.org; Mon, 07 May 2018 09:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fFgPl-00006A-Gv for qemu-devel@nongnu.org; Mon, 07 May 2018 09:42:56 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35443) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fFgPl-00005z-9T for qemu-devel@nongnu.org; Mon, 07 May 2018 09:42:53 -0400 Received: by mail-wm0-x244.google.com with SMTP id o78-v6so15564184wmg.0 for ; Mon, 07 May 2018 06:42:52 -0700 (PDT) Sender: Tomeu Vizoso From: Tomeu Vizoso Date: Mon, 7 May 2018 15:42:37 +0200 Message-Id: <20180507134237.14996-1-tomeu.vizoso@collabora.com> Subject: [Qemu-devel] [PATCH] ui/gtk: Only try to initialize EGL/X11 if GtkGlArea failed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Tomeu Vizoso The commit referenced below changed the logic by causing the gtk-egl backend to be initialized regardless of whether GtkGlArea initialization succeeded. This causes eglInitialize to crash in Wayland systems without XWayland. This patch restores the previous logic. Fixes: 4c70280592f5 ("ui/gtk: use GtkGlArea on wayland only") Signed-off-by: Tomeu Vizoso --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index ef5bc42094a3..72e2e246244d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2448,7 +2448,7 @@ static void early_gtk_display_init(DisplayOptions *opts) if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) { gtk_use_gl_area = true; gtk_gl_area_init(); - } + } else #endif { gtk_egl_init(); -- 2.17.0