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>
This commit is contained in:
Marc-André Lureau 2021-01-25 15:10:36 +04:00
parent 4f41814991
commit ac32b2fff1
5 changed files with 15 additions and 2 deletions

View file

@ -197,6 +197,7 @@ static void egl_headless_init(DisplayState *ds, DisplayOptions *opts)
edpy->dcl.con = con;
edpy->dcl.ops = &egl_ops;
edpy->gls = qemu_gl_init_shader();
qemu_console_set_display_gl_ctx(con, &edpy->dcl);
register_displaychangelistener(&edpy->dcl);
}
}