[Spice-commits] Branch '0.10' - 3 commits - client/application.cpp client/application.h client/controller.cpp client/controller.h client/inputs_channel.cpp client/red_key.h client/x11
Yonit Halperin
yhalperi at kemper.freedesktop.org
Wed Feb 29 23:31:16 PST 2012
client/application.cpp | 2 ++
client/application.h | 2 ++
client/controller.cpp | 2 ++
client/controller.h | 2 ++
client/inputs_channel.cpp | 3 +++
client/red_key.h | 3 +++
client/x11/red_window.cpp | 6 ++++++
7 files changed, 20 insertions(+)
New commits:
commit d82ac68c5ac4dcfb831fe3bd9eefcd65e05f6ce0
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Wed Feb 29 17:02:28 2012 +0200
client X11: support volume keys when evdev is in use
Add support for sending volume keys scancodes to the guest
RHBZ #552539
Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
(cherry picked from commit d2cd7b2b020da1dc7efe778ddfc4525e31784dbb)
diff --git a/client/x11/red_window.cpp b/client/x11/red_window.cpp
index b16249e..fda90d5 100644
--- a/client/x11/red_window.cpp
+++ b/client/x11/red_window.cpp
@@ -186,6 +186,9 @@ enum EvdevKeyCode {
EVDEV_KEYCODE_PAGE_DOWN,
EVDEV_KEYCODE_INSERT,
EVDEV_KEYCODE_DELETE,
+ EVDEV_KEYCODE_MUTE = 121,
+ EVDEV_KEYCODE_VOLUME_DOWN = 122,
+ EVDEV_KEYCODE_VOLUME_UP = 123,
EVDEV_KEYCODE_PAUSE = 127,
EVDEV_KEYCODE_HANGUL = 130,
EVDEV_KEYCODE_HANGUL_HANJA,
@@ -456,6 +459,9 @@ static void init_evdev_map()
{
#define KEYMAP(key_code, red_key) keycode_map[EVDEV_##key_code] = red_key
INIT_MAP;
+ KEYMAP(KEYCODE_MUTE, REDKEY_MUTE);
+ KEYMAP(KEYCODE_VOLUME_DOWN, REDKEY_VOLUME_DOWN);
+ KEYMAP(KEYCODE_VOLUME_UP, REDKEY_VOLUME_UP);
#undef KEYMAP
}
commit 4b468cd45c05c44b6d5c5c6ea2c50e6f955c01ea
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Wed Feb 29 16:58:46 2012 +0200
client: keyboard - add mapping for volume keys
Add support for sending volume keys scancodes to the guest
RHBZ #552539
A good reference for mapping keymaps to scancodes can be found in
spice-gtk/gtk/keymaps.csv
Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
(cherry picked from commit 68cdc5488da1a008fa4e8a4447b85aa8ac9c2735)
diff --git a/client/inputs_channel.cpp b/client/inputs_channel.cpp
index b6f0220..c148eff 100644
--- a/client/inputs_channel.cpp
+++ b/client/inputs_channel.cpp
@@ -561,7 +561,10 @@ void InputsChannel::init_scan_table()
init_escape_scan_code(REDKEY_ESCAPE_BASE);
init_escape_scan_code(REDKEY_PAD_ENTER);
init_escape_scan_code(REDKEY_R_CTRL);
+ init_escape_scan_code(REDKEY_MUTE);
init_escape_scan_code(REDKEY_FAKE_L_SHIFT);
+ init_escape_scan_code(REDKEY_VOLUME_DOWN);
+ init_escape_scan_code(REDKEY_VOLUME_UP);
init_escape_scan_code(REDKEY_PAD_DIVIDE);
init_escape_scan_code(REDKEY_FAKE_R_SHIFT);
init_escape_scan_code(REDKEY_CTRL_PRINT_SCREEN);
diff --git a/client/red_key.h b/client/red_key.h
index ea3396a..3789c9a 100644
--- a/client/red_key.h
+++ b/client/red_key.h
@@ -121,7 +121,10 @@ enum RedKey {
REDKEY_ESCAPE_BASE = 0x100,
REDKEY_PAD_ENTER = REDKEY_ESCAPE_BASE + 0x1c,
REDKEY_R_CTRL = REDKEY_ESCAPE_BASE + 0x1d,
+ REDKEY_MUTE = REDKEY_ESCAPE_BASE + 0x20,
REDKEY_FAKE_L_SHIFT = REDKEY_ESCAPE_BASE + 0x2a,
+ REDKEY_VOLUME_DOWN = REDKEY_ESCAPE_BASE + 0x2e,
+ REDKEY_VOLUME_UP = REDKEY_ESCAPE_BASE + 0x30,
REDKEY_PAD_DIVIDE = REDKEY_ESCAPE_BASE + 0x35,
REDKEY_FAKE_R_SHIFT = REDKEY_ESCAPE_BASE + 0x36,
REDKEY_CTRL_PRINT_SCREEN = REDKEY_ESCAPE_BASE + 0x37,
commit e342ef835732a3696c1eb41204896d125115576a
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Wed Feb 29 11:48:15 2012 +0100
Fix compilation when smartcard support is disabled
The addition of smartcard control to the controller doesn't handle
the case when smartcard support is disabled at compile time. When
this is the case, this causes compile errors.
(cherry picked from commit a50619e7334ff3620034a8b2ea75ceeffd4a805a)
diff --git a/client/application.cpp b/client/application.cpp
index cecc712..482cece 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1689,10 +1689,12 @@ void Application::set_title(const std::string& title)
}
}
+#ifdef USE_SMARTCARD
void Application::enable_smartcard(bool enable)
{
_smartcard_options->enable = enable;
}
+#endif
bool Application::is_key_set_pressed(const HotkeySet& key_set)
{
diff --git a/client/application.h b/client/application.h
index 72501dd..91d63ea 100644
--- a/client/application.h
+++ b/client/application.h
@@ -227,7 +227,9 @@ public:
void external_show();
void connect();
void switch_host(const std::string& host, int port, int sport, const std::string& cert_subject);
+#ifdef USE_SMARTCARD
void enable_smartcard(bool enable);
+#endif
const PeerConnectionOptMap& get_con_opt_map() {return _peer_con_opt;}
const RedPeer::HostAuthOptions& get_host_auth_opt() { return _host_auth_opt;}
diff --git a/client/controller.cpp b/client/controller.cpp
index a0269be..e0b7fe7 100644
--- a/client/controller.cpp
+++ b/client/controller.cpp
@@ -334,9 +334,11 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr)
case CONTROLLER_DELETE_MENU:
_handler->delete_menu();
break;
+#if USE_SMARTCARD
case CONTROLLER_ENABLE_SMARTCARD:
_handler->enable_smartcard(value);
break;
+#endif
case CONTROLLER_SEND_CAD:
default:
LOG_ERROR("Ignoring an unknown/SEND_CAD controller message %u", hdr->id);
diff --git a/client/controller.h b/client/controller.h
index ef996e9..a59d333 100644
--- a/client/controller.h
+++ b/client/controller.h
@@ -50,7 +50,9 @@ public:
virtual Menu* get_app_menu() = 0;
virtual void set_menu(Menu* menu) = 0;
virtual void delete_menu() = 0;
+#ifdef USE_SMARTCARD
virtual void enable_smartcard(bool enable) = 0;
+#endif
};
class Controller : public NamedPipe::ListenerInterface {
More information about the Spice-commits
mailing list