- Fix being unable to send ctrl+alt+key when release mouse is bound to

ctrl+alt (which can happen when used from RHEV-M)
This commit is contained in:
Hans de Goede 2011-03-11 15:37:14 +01:00
parent 092eb62591
commit 4e4d5e053f
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,47 @@
From b30f8b877ca7b1f27422005310b9e82985d80214 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 11 Mar 2011 14:04:10 +0100
Subject: [PATCH spice] 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.
---
client/application.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
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
--
1.7.3.2

View File

@ -1,11 +1,12 @@
Name: spice
Version: 0.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Implements the SPICE protocol
Group: User Interface/Desktops
License: LGPLv2+
URL: http://www.spice-space.org/
Source0: http://www.spice-space.org/download/releases/%{name}-%{version}.tar.bz2
Patch0: 0001-client-Don-t-handle-hotkeys-while-sticky-alt-is-acti.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=613529
ExclusiveArch: i686 x86_64
@ -64,6 +65,7 @@ using spice-server, you will need to install spice-server-devel.
%prep
%setup -q
%patch0 -p1
%build
%configure --enable-gui --enable-smartcard
@ -106,6 +108,10 @@ rm -f %{buildroot}%{_libdir}/libspice-server.la
%endif
%changelog
* Fri Mar 11 2011 Hans de Goede <hdegoede@redhat.com> - 0.8.0-2
- Fix being unable to send ctrl+alt+key when release mouse is bound to
ctrl+alt (which can happen when used from RHEV-M)
* Tue Mar 1 2011 Hans de Goede <hdegoede@redhat.com> - 0.8.0-1
- New upstream release 0.8.0