mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -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:
parent
2a2c4830c0
commit
5643fc012c
3 changed files with 137 additions and 12 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue