ui/console: egl-headless is compatible with non-gl listeners
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 16 Feb 2022 15:42:40 +0000 (19:42 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 14 Mar 2022 11:16:05 +0000 (15:16 +0400)
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>
ui/egl-headless.c

index 9aff115280bcabb1ece8924b51c2f0f9fb57ec63..7a30fd9777654931c55e0b66bbdfa7c98480831d 100644 (file)
@@ -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;
 }