aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-08-30 13:37:58 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-09-04 13:52:16 +0400
commit7fa4b8041b870951642515e0954d274ec4d599b1 (patch)
tree00c8b2b4a3a27de893307137caa052fa2566ef5a /ui
parentf9411aaebd99e1efb04f0d32f01b37467e43b6a0 (diff)
ui/console: update the head from unused QemuConsole
When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-25-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c
index 08bed58b80..a9a922b6e3 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2193,10 +2193,10 @@ QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head,
} else {
trace_console_gfx_new();
s = (QemuConsole *)object_new(TYPE_QEMU_GRAPHIC_CONSOLE);
- s->head = head;
s->ui_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
dpy_set_ui_info_timer, s);
}
+ s->head = head;
graphic_console_set_hwops(s, hw_ops, opaque);
if (dev) {
object_property_set_link(OBJECT(s), "device", OBJECT(dev),