[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/5] spice: learn to hide cursor
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 5/5] spice: learn to hide cursor |
Date: |
Mon, 27 Apr 2015 13:07:06 +0200 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/spice-display.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index a09f6f8..c71a059 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -260,7 +260,8 @@ static void qemu_spice_create_update(SimpleSpiceDisplay
*ssd)
static SimpleSpiceCursor*
qemu_spice_create_cursor_update(SimpleSpiceDisplay *ssd,
- QEMUCursor *c)
+ QEMUCursor *c,
+ int on)
{
size_t size = c ? c->width * c->height * 4 : 0;
SimpleSpiceCursor *update;
@@ -288,6 +289,8 @@ qemu_spice_create_cursor_update(SimpleSpiceDisplay *ssd,
cursor->data_size = size;
cursor->chunk.data_size = size;
memcpy(cursor->chunk.data, c->data, size);
+ } else if (!on) {
+ ccmd->type = QXL_CURSOR_HIDE;
} else {
ccmd->type = QXL_CURSOR_MOVE;
ccmd->u.position.x = ssd->ptr_x + ssd->hot_x;
@@ -738,7 +741,7 @@ static void display_mouse_set(DisplayChangeListener *dcl,
if (ssd->ptr_move) {
g_free(ssd->ptr_move);
}
- ssd->ptr_move = qemu_spice_create_cursor_update(ssd, NULL);
+ ssd->ptr_move = qemu_spice_create_cursor_update(ssd, NULL, on);
qemu_mutex_unlock(&ssd->lock);
}
@@ -757,7 +760,7 @@ static void display_mouse_define(DisplayChangeListener *dcl,
if (ssd->ptr_define) {
g_free(ssd->ptr_define);
}
- ssd->ptr_define = qemu_spice_create_cursor_update(ssd, c);
+ ssd->ptr_define = qemu_spice_create_cursor_update(ssd, c, 0);
qemu_mutex_unlock(&ssd->lock);
}
--
1.8.3.1
- [Qemu-devel] [PULL 0/5] spice patch queue., Gerd Hoffmann, 2015/04/27
- [Qemu-devel] [PULL 4/5] spice: set pointer position on hotspot, Gerd Hoffmann, 2015/04/27
- [Qemu-devel] [PULL 1/5] monitor: Make client_migrate_info synchronous, Gerd Hoffmann, 2015/04/27
- [Qemu-devel] [PULL 3/5] spice: fix mouse cursor position, Gerd Hoffmann, 2015/04/27
- [Qemu-devel] [PULL 5/5] spice: learn to hide cursor,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 2/5] spice: fix simple display on bigendian hosts, Gerd Hoffmann, 2015/04/27
- Re: [Qemu-devel] [PULL 0/5] spice patch queue., Peter Maydell, 2015/04/28