From: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx> When mouse mode (client/server) changed, spice server notifies QXL instance to allow QEMU to optimize cursor-related traffic from guest to host. Signed-off-by: Yuri Benditovich <Yuri Benditovich yuri.benditovich@xxxxxxxxxx> --- server/red-qxl.c | 4 ++++ server/spice-qxl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 19cff95..744ff0c 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@ -1070,7 +1070,11 @@ void red_qxl_on_vc_change(QXLInstance *qxl, GArray *video_codecs) void red_qxl_set_mouse_mode(QXLInstance *qxl, uint32_t mode) { + QXLInterface *interface = qxl_get_interface(qxl); RedWorkerMessageSetMouseMode payload; + if (interface->mouse_mode_changed) { + interface->mouse_mode_changed(qxl); + } payload.mode = mode; dispatcher_send_message(qxl->st->dispatcher, RED_WORKER_MESSAGE_SET_MOUSE_MODE, diff --git a/server/spice-qxl.h b/server/spice-qxl.h index b8910bf..a333cd8 100644 --- a/server/spice-qxl.h +++ b/server/spice-qxl.h @@ -205,6 +205,7 @@ struct QXLInterface { * return code. */ int (*client_monitors_config)(QXLInstance *qin, VDAgentMonitorsConfig *monitors_config); + void (*mouse_mode_changed)(QXLInstance *qin); }; struct QXLInstance { -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel