summaryrefslogtreecommitdiffstats
path: root/ui/egl-headless.c
diff options
context:
space:
mode:
authorMarc-André Lureau2022-02-16 16:42:40 +0100
committerMarc-André Lureau2022-03-14 12:16:05 +0100
commitcd19c25fbfaeee8865a2f8dcb532d758615bc8c9 (patch)
tree868f3be45f393dafd971654da3af1569ed551fe9 /ui/egl-headless.c
parentui/console: move dcl compatiblity check to a callback (diff)
downloadqemu-cd19c25fbfaeee8865a2f8dcb532d758615bc8c9.tar.gz
qemu-cd19c25fbfaeee8865a2f8dcb532d758615bc8c9.tar.xz
qemu-cd19c25fbfaeee8865a2f8dcb532d758615bc8c9.zip
ui/console: egl-headless is compatible with non-gl listeners
Fix a regression introduced by commit 5e79d516e ("ui: split the GL context in a different object"). Reported-by: Akihiko Odaki <akihiko.odaki@gmail.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/egl-headless.c')
-rw-r--r--ui/egl-headless.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index 9aff115280..7a30fd9777 100644
--- a/ui/egl-headless.c
+++ b/ui/egl-headless.c
@@ -170,6 +170,14 @@ static bool
egl_is_compatible_dcl(DisplayGLCtx *dgc,
DisplayChangeListener *dcl)
{
+ if (!dcl->ops->dpy_gl_update) {
+ /*
+ * egl-headless is compatible with all 2d listeners, as it blits the GL
+ * updates on the 2d console surface.
+ */
+ return true;
+ }
+
return dcl->ops == &egl_ops;
}