diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-03-11 14:04:10 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2011-03-11 15:32:06 +0100 |
commit | a9d54d4c6ca0ed38df318f5f0921b9be7afd88a5 (patch) | |
tree | 33a99c7eeb65cdb3ddef7bbe54ca92b6ed797bb4 /client/application.cpp | |
parent | 5c3f38fb74c6d377feee07d8e51b3770ffca8ea6 (diff) | |
download | spice-0.6.tar.gz spice-0.6.tar.xz spice-0.6.zip |
client: Don't handle hotkeys while sticky alt is active0.6
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.
Diffstat (limited to 'client/application.cpp')
-rw-r--r-- | client/application.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/application.cpp b/client/application.cpp index 6113f509..45eb457a 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1225,10 +1225,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 |