[Spice-devel] [PATCH] win32: fix alt-tab grab regression

Marc-André Lureau marcandre.lureau at gmail.com
Thu Sep 26 11:25:28 PDT 2013


Since 5f67178c, alt-tab is no longer grabbed by the client. The keyboard
hook still needs to handle WM_SYSKEY{DOWN,UP} messages.

https://bugzilla.redhat.com/show_bug.cgi?id=873341
---
 gtk/spice-widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 4ac1a2f..d39ff59 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -659,7 +659,7 @@ void spice_display_set_grab_keys(SpiceDisplay *display, SpiceGrabSequence *seq)
 #ifdef WIN32
 static LRESULT CALLBACK keyboard_hook_cb(int code, WPARAM wparam, LPARAM lparam)
 {
-    if  (win32_window && code == HC_ACTION && wparam == WM_KEYDOWN) {
+    if  (win32_window && code == HC_ACTION && wparam != WM_KEYUP) {
         KBDLLHOOKSTRUCT *hooked = (KBDLLHOOKSTRUCT*)lparam;
         DWORD dwmsg = (hooked->flags << 24) | (hooked->scanCode << 16) | 1;
 
-- 
1.8.3.1



More information about the Spice-devel mailing list