summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-05-18 21:51:52 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-05-24 13:55:31 +0200
commitb4e9afc721882ae14fe9e720a3cd113701cf9f8e (patch)
tree089e4f273eebe9327578618bb9689ddadb652811
parent3d45018086688697bc5d3686b9fd47a079155094 (diff)
desktop_layout: fix incorrect total_width/height
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
-rw-r--r--vdagent/desktop_layout.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}