[Spice-devel] [PATCH win-agent] Revert "Refresh monitor config only when needed"

Marc-André Lureau marcandre.lureau at gmail.com
Tue Apr 23 08:08:02 PDT 2013


This reverts commit 67c1bcf49367d1726033b298a8ab016b4e22cf23.

Also add a comment why the refresh is necessary there. The original
issue, reentering call, doesn't seem reproducible...

https://bugzilla.redhat.com/show_bug.cgi?id=912793
---
 vdagent/vdagent.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index 639b33e..6f605c8 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -619,7 +619,6 @@ bool VDAgent::handle_mon_config(VDAgentMonitorsConfig* mon_config, uint32_t port
     VDAgentReply* reply;
     size_t display_count;
 
-    _desktop_layout->get_displays();
     display_count = _desktop_layout->get_display_count();
     for (uint32_t i = 0; i < display_count; i++) {
         DisplayMode* mode = _desktop_layout->get_display(i);
@@ -1377,6 +1376,9 @@ LRESULT CALLBACK VDAgent::wnd_proc(HWND hwnd, UINT message, WPARAM wparam, LPARA
     switch (message) {
     case WM_DISPLAYCHANGE:
         vd_printf("Display change");
+        // the desktop layout needs to be updated for the mouse
+        // position to be scaled correctly
+        a->_desktop_layout->get_displays();
         break;
     case WM_TIMER:
         a->send_input();
-- 
1.8.2.1.342.gfa7285d



More information about the Spice-devel mailing list