diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-01-25 15:10:36 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2021-12-21 10:50:21 +0400 |
commit | ac32b2fff127843355b4f7e7ac9f93dd4a395adf (patch) | |
tree | 796c3741bb0b7b985c7882a896340088d38f966c /ui/console.c | |
parent | 4f4181499170dcf80182745b319607802ea32896 (diff) |
ui: associate GL context outside of display listener registration
Consoles can have an associated GL context, without listeners (they may
be added or removed later on).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c index 7b83e6cdea..87f897e46d 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1465,8 +1465,11 @@ void register_displaychangelistener(DisplayChangeListener *dcl) assert(!dcl->ds); - if (dcl->ops->dpy_gl_ctx_create) { - qemu_console_set_display_gl_ctx(dcl->con, dcl); + if (dcl->con && dcl->con->gl && + dcl->con->gl != dcl) { + error_report("Display %s is incompatible with the GL context", + dcl->ops->dpy_name); + exit(1); } if (dcl->con) { |