Skip to content

Commit

Permalink
ui/gtk: Only try to initialize EGL/X11 if GtkGlArea failed
Browse files Browse the repository at this point in the history
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: 4c70280 ("ui/gtk: use GtkGlArea on wayland only")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Message-id: 20180507134237.14996-1-tomeu.vizoso@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
tomeuv authored and kraxel committed May 15, 2018
1 parent 1d18774 commit 4f4cb82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/gtk.c
Expand Up @@ -2484,7 +2484,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();
Expand Down

0 comments on commit 4f4cb82

Please sign in to comment.