summaryrefslogtreecommitdiffstats
path: root/client/application.cpp
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-03-11 14:04:10 +0100
committerHans de Goede <hdegoede@redhat.com>2011-03-11 14:59:15 +0100
commit9d204f8b74c8fbcc6a508f956e9c483e98ce653d (patch)
tree3be22d55af0971e082f5580192574e13112503bd /client/application.cpp
parent61d8e54766e006418d9a3720a0256ac294ecb413 (diff)
downloadspice-9d204f8b74c8fbcc6a508f956e9c483e98ce653d.tar.gz
spice-9d204f8b74c8fbcc6a508f956e9c483e98ce653d.tar.xz
spice-9d204f8b74c8fbcc6a508f956e9c483e98ce653d.zip
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.
Diffstat (limited to 'client/application.cpp')
-rw-r--r--client/application.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/application.cpp b/client/application.cpp
index 4cb5c2db..9d395eef 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