summaryrefslogtreecommitdiff
path: root/gtk/gtkaccelgroup.c
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2014-12-24 16:10:12 -0800
committerMatthias Clasen <mclasen@redhat.com>2015-08-25 15:54:58 -0400
commitc55ff6e41fb3c6272b5e7a084c8273dea60d7dee (patch)
treea49e8f954aa091cb9d0de4dac1059f55946d70c6 /gtk/gtkaccelgroup.c
parent30d56933d44d88c3f99b9f5e0c8d5264694026c3 (diff)
downloadgtk+-c55ff6e41fb3c6272b5e7a084c8273dea60d7dee.tar.gz
Bug 736125 - The default gtk accelerator mod mask does not include all default backend modifiers
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r--gtk/gtkaccelgroup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 0523efe87a..15a27d48d4 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -73,12 +73,7 @@ static void accel_closure_invalidate (gpointer data,
static guint signal_accel_activate = 0;
static guint signal_accel_changed = 0;
static guint quark_acceleratable_groups = 0;
-static guint default_accel_mod_mask = (GDK_SHIFT_MASK |
- GDK_CONTROL_MASK |
- GDK_MOD1_MASK |
- GDK_SUPER_MASK |
- GDK_HYPER_MASK |
- GDK_META_MASK);
+static guint default_accel_mod_mask = 0;
enum {
PROP_0,
@@ -1752,5 +1747,10 @@ gtk_accelerator_set_default_mod_mask (GdkModifierType default_mod_mask)
GdkModifierType
gtk_accelerator_get_default_mod_mask (void)
{
+ if (!default_accel_mod_mask)
+ default_accel_mod_mask =
+ gdk_keymap_get_modifier_mask (gdk_keymap_get_default (),
+ GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK);
+
return default_accel_mod_mask;
}