summaryrefslogtreecommitdiffstats
path: root/client/application.cpp
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2011-05-26 17:20:19 +0300
committerYonit Halperin <yhalperi@redhat.com>2011-06-14 10:15:41 +0300
commit8131249d6cabadfa94f2c251e5cfec204b190ae1 (patch)
tree844ed9d247dbb37259211159d4e7c37e1c690973 /client/application.cpp
parentd1a1a1b4c71791fdb27467be6a3bb451846ee26d (diff)
downloadspice-8131249d6cabadfa94f2c251e5cfec204b190ae1.tar.gz
spice-8131249d6cabadfa94f2c251e5cfec204b190ae1.tar.xz
spice-8131249d6cabadfa94f2c251e5cfec204b190ae1.zip
client: fix for redundant shift+f11 RHBZ #674532
After shift+F11, both in Windows 7 and xp clients, WM_KEYUP events were missing for SHIFT and F11. For F11 it was less important since unpress_all was preformed for all keys. However, we perform sync for all the keyboard modifiers and the GetKeyboardState returns "down" for shift. In windows7 client, we sometimes received afterwards a F11 KEYDOWN event repetition, and this caused SHIFT+F11 to be called again. Not performing hiding of the windows while changing client resolutions, solved the problem of missing events, and I don't see any difference in how spice looks while toggling to full screen. Using GetAsyncKeyState, returns "UP" for shift in windows 7, and helps avoid performing shift+f11 again, if there is an F11 repetition before we receive the KEYUP event for shift.
Diffstat (limited to 'client/application.cpp')
-rw-r--r--client/application.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/application.cpp b/client/application.cpp
index 606f7e24..8e9fd8a8 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1524,7 +1524,11 @@ void Application::enter_full_screen()
_changing_screens = true;
bool capture = release_capture();
assign_monitors();
+#ifndef WIN32
+ /* performing hide during resolution changes resulted in
+ missing WM_KEYUP events */
hide();
+#endif
prepare_monitors();
position_screens();
show_full_screen();