From 4f4556be3514a55616c4dc1f038a686eb6a38d62 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 5 May 2016 10:41:27 -0400 Subject: [PATCH] wayland_egl: unset global egl context if used wl_display changes as long as evas uses a global gl context any change to the wl_display must trigger a full re-create on that context --- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 532e749bf2..509e8ae1fe 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -5,6 +5,7 @@ /* local variables */ static Outbuf *_evas_gl_wl_window = NULL; static EGLContext context = EGL_NO_CONTEXT; +static struct wl_display *display = NULL; static int win_count = 0; Outbuf * @@ -29,6 +30,9 @@ eng_window_new(Evas *evas, Evas_Engine_Info_Wayland_Egl *einfo, int w, int h, Re gw->h = h; gw->swap_mode = swap_mode; gw->disp = einfo->info.display; + if (display && (display != gw->disp)) + context = EGL_NO_CONTEXT; + display = gw->disp; gw->surface = einfo->info.surface; gw->screen = einfo->info.screen; gw->depth = einfo->info.depth;