[gtk+] gtk: enable setting virtual modifiers in GtkCellRendererAccel
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: enable setting virtual modifiers in GtkCellRendererAccel
- Date: Mon, 26 Sep 2011 14:02:37 +0000 (UTC)
commit 3fd7dbc94074826755da7fc3237e439ba6e81ada
Author: Michael Natterer <mitch lanedo com>
Date: Fri Sep 16 15:39:23 2011 +0200
gtk: enable setting virtual modifiers in GtkCellRendererAccel
Call gdk_keymap_add_virtual_modifiers() on event->state,
so virtual modifiers get added at all.
(cherry picked from commit be1eea612cb7beacffdc0b31e7158195004f5e2d)
gtk/gtkcellrendereraccel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index 174f44c..08c61d7 100644
--- a/gtk/gtkcellrendereraccel.c
+++ b/gtk/gtkcellrendereraccel.c
@@ -471,11 +471,14 @@ grab_key_callback (GtkWidget *widget,
event->group,
NULL, NULL, NULL, &consumed_modifiers);
+ accel_mods = event->state;
+ gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (display), &accel_mods);
+
accel_key = gdk_keyval_to_lower (event->keyval);
if (accel_key == GDK_KEY_ISO_Left_Tab)
accel_key = GDK_KEY_Tab;
- accel_mods = event->state & gtk_accelerator_get_default_mod_mask ();
+ accel_mods &= gtk_accelerator_get_default_mod_mask ();
/* Filter consumed modifiers
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]