[gnome-control-center/gnome-3-4] shell: Don't handle shortcuts with excess modifiers
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-4] shell: Don't handle shortcuts with excess modifiers
- Date: Mon, 16 Jul 2012 17:07:38 +0000 (UTC)
commit e5bfcb23d31310e73dc73c2af5a6230e772d115f
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 16 18:05:04 2012 +0100
shell: Don't handle shortcuts with excess modifiers
Ctrl+Alt+W shouldn't be handled the same way as Ctrl+W.
https://bugzilla.gnome.org/show_bug.cgi?id=675475
shell/gnome-control-center.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index d046033..195a0a1 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -1058,12 +1058,20 @@ window_key_press_event (GtkWidget *win,
GdkEventKey *event,
GnomeControlCenter *self)
{
+ GdkKeymap *keymap;
gboolean retval;
+ GdkModifierType state;
+
+ if (event->state == 0)
+ return FALSE;
retval = FALSE;
+ state = event->state;
+ keymap = gdk_keymap_get_default ();
+ gdk_keymap_add_virtual_modifiers (keymap, &state);
+ state = state & gtk_accelerator_get_default_mod_mask ();
- if (event->state != 0 &&
- (event->state & GDK_CONTROL_MASK))
+ if (state == GDK_CONTROL_MASK)
{
switch (event->keyval)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]