[Spice-commits] Branch '0.8' - client/application.cpp

Hans de Goede jwrdegoede at kemper.freedesktop.org
Fri Mar 11 06:29:55 PST 2011


 client/application.cpp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit b30f8b877ca7b1f27422005310b9e82985d80214
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Mar 11 14:04:10 2011 +0100

    client: Don't handle hotkeys while sticky alt is active
    
    In some cases rhev-m changes the hotkey for releasing the mouse grab
    to ctrl + alt. This makes it impossible to send ctrl + alt + other-key
    to the guest, even when using sticky alt.
    
    What happens is:
    -press alt until sticky alt activates
    -release alt (but recorded state stays pressed due to sticky alt)
    -press ctrl
    -hotkey code sees ctrl+alt pressed, releases mouse grab
    -mouse grab release code does an unpress all -> end of sticky state.
    
    This patch makes it possible to atleast send ctrl + alt + del (or other key)
    using sticky alt. Note: even with this patch it is still a bad idea to
    use ctrl + alt as hotkey combi.

diff --git a/client/application.cpp b/client/application.cpp
index 9257eb2..9bff1c5 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1247,10 +1247,12 @@ void Application::on_key_down(RedKey key)
         }
     }
 
-    int command = get_hotkeys_commnad();
-    if (command != APP_CMD_INVALID) {
-        do_command(command);
-        return;
+    if (!_sticky_info.sticky_mode) {
+        int command = get_hotkeys_commnad();
+        if (command != APP_CMD_INVALID) {
+            do_command(command);
+            return;
+        }
     }
 
 #ifdef WIN32


More information about the Spice-commits mailing list