diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-02-16 19:33:37 +0400 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-03-14 15:16:01 +0400 |
| commit | a62c4a178fb154a3b810870502cb4c63a6b4cf28 (patch) | |
| tree | c548b0ce1df3ec573a03a2335e8d17fd04289084 /ui/spice-display.c | |
| parent | 398d1c91ed58fb7fe3dd3e9596519678c816bb69 (diff) | |
| download | focaccia-qemu-a62c4a178fb154a3b810870502cb4c63a6b4cf28.tar.gz focaccia-qemu-a62c4a178fb154a3b810870502cb4c63a6b4cf28.zip | |
ui/console: move dcl compatiblity check to a callback
As expected from the "compatible_dcl" comment, a simple comparison of ops isn't enough. The following patch will fix a regression introduced by this limited check by extending the compatibility callback for egl-headless. For now, this patch simply replaces the the "compatible_dcl" ops pointer with a "dpy_gl_ctx_is_compatible_ctx" callback. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-display.c')
| -rw-r--r-- | ui/spice-display.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c index a3078adf91..494168e7fe 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1125,8 +1125,15 @@ static const DisplayChangeListenerOps display_listener_gl_ops = { .dpy_gl_update = qemu_spice_gl_update, }; +static bool +qemu_spice_is_compatible_dcl(DisplayGLCtx *dgc, + DisplayChangeListener *dcl) +{ + return dcl->ops == &display_listener_gl_ops; +} + static const DisplayGLCtxOps gl_ctx_ops = { - .compatible_dcl = &display_listener_gl_ops, + .dpy_gl_ctx_is_compatible_dcl = qemu_spice_is_compatible_dcl, .dpy_gl_ctx_create = qemu_spice_gl_create_context, .dpy_gl_ctx_destroy = qemu_egl_destroy_context, .dpy_gl_ctx_make_current = qemu_egl_make_context_current, |