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/vnc.c | |
| parent | 2512a026fab8d526e623426a3002599a2de09d16 (diff) | |
| download | focaccia-qemu-385ac97f8fad0e6980c5dfea71132d5ecfb16608.tar.gz focaccia-qemu-385ac97f8fad0e6980c5dfea71132d5ecfb16608.zip | |
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/vnc.c b/ui/vnc.c index 8aec5d751e..bbd8b6baae 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); |