aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-19 15:10:17 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-21 11:17:44 +0400
commit3c293a46627063eb4b12d808c7ec43b1cff8e463 (patch)
tree8fbf4ba3af1b5344a384a8f83acc88e2385932a6 /ui
parent281a77df28bdea2b4c475a26d4c2d92b2d931af9 (diff)
downloadqemu-3c293a46627063eb4b12d808c7ec43b1cff8e463.zip
qemu-3c293a46627063eb4b12d808c7ec43b1cff8e463.tar.gz
qemu-3c293a46627063eb4b12d808c7ec43b1cff8e463.tar.bz2
ui: return the default console cursor when con == NULL
VNC code relies on con==NULL to mean the default console. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1548 Fixes: commit 385ac97f8 ("ui: keep current cursor with QemuConsole") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reported-by: Helge Konetzka <hk@zapateado.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230319111017.1319880-1-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c
index f378302..6e8a3cd 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2303,6 +2303,9 @@ QemuConsole *qemu_console_lookup_unused(void)
QEMUCursor *qemu_console_get_cursor(QemuConsole *con)
{
+ if (con == NULL) {
+ con = active_console;
+ }
return con->cursor;
}