aboutsummaryrefslogtreecommitdiff
path: root/ui/console.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-01-25 15:10:36 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-12-21 10:50:21 +0400
commitac32b2fff127843355b4f7e7ac9f93dd4a395adf (patch)
tree796c3741bb0b7b985c7882a896340088d38f966c /ui/console.c
parent4f4181499170dcf80182745b319607802ea32896 (diff)
downloadqemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.zip
qemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.tar.gz
qemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.tar.bz2
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c
index 7b83e6c..87f897e 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) {