From 5643fc012c2b7335eda43db90bd1e64d912428b0 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Sat, 7 Jun 2014 13:03:10 +0200 Subject: spice: add mouse cursor support So you'll have a mouse pointer when running non-qxl gfx cards with mouse pointer support (virtio-gpu, IIRC vmware too). Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index a46bc80019..4252ab856f 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -69,6 +69,7 @@ QXLCookie *qxl_cookie_new(int type, uint64_t io); typedef struct SimpleSpiceDisplay SimpleSpiceDisplay; typedef struct SimpleSpiceUpdate SimpleSpiceUpdate; +typedef struct SimpleSpiceCursor SimpleSpiceCursor; struct SimpleSpiceDisplay { DisplaySurface *ds; @@ -92,6 +93,13 @@ struct SimpleSpiceDisplay { */ QemuMutex lock; QTAILQ_HEAD(, SimpleSpiceUpdate) updates; + + /* cursor (without qxl): displaychangelistener -> spice server */ + SimpleSpiceCursor *ptr_define; + SimpleSpiceCursor *ptr_move; + uint16_t ptr_x, ptr_y; + + /* cursor (with qxl): qxl local renderer -> displaychangelistener */ QEMUCursor *cursor; int mouse_x, mouse_y; }; @@ -104,6 +112,12 @@ struct SimpleSpiceUpdate { QTAILQ_ENTRY(SimpleSpiceUpdate) next; }; +struct SimpleSpiceCursor { + QXLCursorCmd cmd; + QXLCommandExt ext; + QXLCursor cursor; +}; + int qemu_spice_rect_is_empty(const QXLRect* r); void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r); -- cgit v1.2.3