aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk.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/gtk.c
parent4f4181499170dcf80182745b319607802ea32896 (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/gtk.c')
-rw-r--r--ui/gtk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index c0d8a9f061..25896023ff 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2083,6 +2083,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
vc->gfx.kbd = qkbd_state_init(con);
vc->gfx.dcl.con = con;
+ if (display_opengl) {
+ qemu_console_set_display_gl_ctx(con, &vc->gfx.dcl);
+ }
register_displaychangelistener(&vc->gfx.dcl);
gd_connect_vc_gfx_signals(vc);