[Spice-devel] [PATCH win-agent] desktop_layout: fix incorrect total_width/height
Arnon Gilboa
agilboa at redhat.com
Sun May 27 23:44:42 PDT 2012
Nice catch. ACK.
Marc-André Lureau wrote:
> When resizing desktop to best match, the agent fails to update
> it's current mode width/height and then incorrectly report
> different total_width/total_height than real screen dimensions,
> then scaling input incorrectly results in mouse cursor offset.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=823019
> ---
> vdagent/desktop_layout.cpp | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
> index 7564cf6..3b474d1 100644
> --- a/vdagent/desktop_layout.cpp
> +++ b/vdagent/desktop_layout.cpp
> @@ -298,6 +298,11 @@ bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, DEVMODE* dev_mode, DisplayMo
> dev_mode->dmPosition.y = mode->_pos_y;
> dev_mode->dmFields |= DM_POSITION;
> }
> +
> + // update current DisplayMode (so mouse scaling works properly)
> + mode->_width = dev_mode->dmPelsWidth;
> + mode->_height = dev_mode->dmPelsHeight;
> +
> return true;
> }
>
>
More information about the Spice-devel
mailing list