summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDongwon Kim2022-09-28 23:58:05 +0200
committerGerd Hoffmann2022-10-11 15:38:08 +0200
commit604a86895feb6639417fe957dfc95191f7f63565 (patch)
tree460d74b391314a608782cd23d08f1f96e617d534 /ui
parentui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext (diff)
downloadqemu-604a86895feb6639417fe957dfc95191f7f63565.tar.gz
qemu-604a86895feb6639417fe957dfc95191f7f63565.tar.xz
qemu-604a86895feb6639417fe957dfc95191f7f63565.zip
ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch
A thread often fails to bind an egl context to itself after guest VM is rebooted because the context is still owned by another thread. It is not very clear what condition makes this happen but this can be prevented by unbinding the context from the thread in the end of gd_egl_switch. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Message-Id: <20220928215805.4661-1-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk-egl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index b5bffbab25..35f917ceb1 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -195,6 +195,9 @@ void gd_egl_switch(DisplayChangeListener *dcl,
if (resized) {
gd_update_windowsize(vc);
}
+
+ eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
+ EGL_NO_CONTEXT);
}
QEMUGLContext gd_egl_create_context(DisplayGLCtx *dgc,