aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-01-17 15:24:40 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 22:57:39 +0400
commit385ac97f8fad0e6980c5dfea71132d5ecfb16608 (patch)
tree2b9634e3b166674703a0a5e0493d01c0cc712dc5 /ui/vnc.c
parent2512a026fab8d526e623426a3002599a2de09d16 (diff)
downloadqemu-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/vnc.c')
-rw-r--r--ui/vnc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 8aec5d7..bbd8b6b 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -988,10 +988,10 @@ static void vnc_mouse_set(DisplayChangeListener *dcl,
static int vnc_cursor_define(VncState *vs)
{
- QEMUCursor *c = vs->vd->cursor;
+ QEMUCursor *c = qemu_console_get_cursor(vs->vd->dcl.con);
int isize;
- if (!vs->vd->cursor) {
+ if (!c) {
return -1;
}
@@ -1029,10 +1029,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListener *dcl,
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
VncState *vs;
- cursor_unref(vd->cursor);
g_free(vd->cursor_mask);
-
- vd->cursor = cursor_ref(vd->cursor);
vd->cursor_msize = cursor_get_mono_bpl(c) * c->height;
vd->cursor_mask = g_malloc0(vd->cursor_msize);
cursor_get_mono_mask(c, 0, vd->cursor_mask);