diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-01-17 15:24:40 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-13 22:57:39 +0400 |
commit | 385ac97f8fad0e6980c5dfea71132d5ecfb16608 (patch) | |
tree | 2b9634e3b166674703a0a5e0493d01c0cc712dc5 /ui/console.c | |
parent | 2512a026fab8d526e623426a3002599a2de09d16 (diff) | |
download | qemu-385ac97f8fad0e6980c5dfea71132d5ecfb16608.zip qemu-385ac97f8fad0e6980c5dfea71132d5ecfb16608.tar.gz qemu-385ac97f8fad0e6980c5dfea71132d5ecfb16608.tar.bz2 |
ui: keep current cursor with QemuConsole
Keeping the current cursor around is useful, not only for VNC, but for
other displays. Let's move it down, see the following patches for other
usages.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c index 98b701f..0dccbdd 100644 --- a/ui/console.c +++ b/ui/console.c @@ -94,6 +94,7 @@ struct QemuConsole { uint32_t head; QemuUIInfo ui_info; QEMUTimer *ui_timer; + QEMUCursor *cursor; const GraphicHwOps *hw_ops; void *hw; @@ -1923,6 +1924,8 @@ void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor) DisplayState *s = con->ds; DisplayChangeListener *dcl; + cursor_unref(con->cursor); + con->cursor = cursor_ref(cursor); if (!qemu_console_is_visible(con)) { return; } @@ -2288,6 +2291,11 @@ QemuConsole *qemu_console_lookup_unused(void) return NULL; } +QEMUCursor *qemu_console_get_cursor(QemuConsole *con) +{ + return con->cursor; +} + bool qemu_console_is_visible(QemuConsole *con) { return (con == active_console) || (con->dcls > 0); |