mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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 <kraxel@redhat.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user