[Spice-devel] [PATCH spice-gtk] widget: Fix mouse position reporting for multiple monitors on 1 display channel

Uri Lublin uril at redhat.com
Mon Feb 4 05:52:17 PST 2013


[CC'ing Arnon]

On 02/02/2013 05:30 PM, Hans de Goede wrote:
> VDAgentMouseState contains a display_id and expects coordinates in multi-mon
> mode to be relative to the origin of the monitor specified by the display_id.
>
> The agent will then adjust the mouse coordinates for the position of the
> monitor as configured in the guest.
>
> In multiple monitors on 1 display channel spice-gtk is wrongly setting
> display_id to the channel_id (which is 0 for all monitors), and is working

I think the channel_id is not always 0 for Windows guests.

> around the problems this causes by doing the adjustment of the mouse position
> itself.
>
> But the agent is still applying the correction for the monitor position to
> all VDAgentMouseState messages it gets, and since for all monitors a display_id
> of 0 is reported it always uses the position of display 0 for the correction.
>
> Since the position of display 0 is usally +0+0 this usually works, but as soon
> as the position of display 0 is not +0+0, the correction will get done twice
> for display 0, and the display 0 position will wrongly get added the mouse
> position for other displays.
>
> This patch fixes this by properly setting display_id, and removing the
> modification of the mouse coordinates as that is already done in the agent.

Is that also holds for the Windows agent ?




More information about the Spice-devel mailing list