diff options
author | Michael Natterer <mitch@lanedo.com> | 2011-11-18 12:25:03 +0100 |
---|---|---|
committer | Michael Natterer <mitch@gimp.org> | 2011-11-18 13:06:27 +0100 |
commit | 1c8481a6ea52f34210177f54159d231ea4ba0b7d (patch) | |
tree | 9583e4b0b6f7453593281f24f69b290c8e68e7c3 /gtk/gtkprivate.h | |
parent | 43dd705308c0c30b573e82cffb67992081c81b7b (diff) | |
download | gtk+-1c8481a6ea52f34210177f54159d231ea4ba0b7d.tar.gz |
Bug 663856 - Make option-foo accelerators use the right symbol
If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.
- fix quartz' gdk_keymap_translate_keyboard_state() to return
the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
Diffstat (limited to 'gtk/gtkprivate.h')
-rw-r--r-- | gtk/gtkprivate.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index 53290ffc4d..e243199bc3 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -62,6 +62,23 @@ GdkModifierType _gtk_replace_virtual_modifiers (GdkKeymap *keymap, GdkModifierType modifiers); GdkModifierType _gtk_get_primary_accel_mod (void); +/* temp hack, will go away soon --mitch */ +#ifndef GDK_WINDOWING_QUARTZ +#define GTK_TOGGLE_GROUP_MOD_MASK 0 +#else +#define GTK_TOGGLE_GROUP_MOD_MASK GDK_MOD1_MASK +#endif + +gboolean _gtk_translate_keyboard_accel_state (GdkKeymap *keymap, + guint hardware_keycode, + GdkModifierType state, + GdkModifierType accel_mask, + gint group, + guint *keyval, + gint *effective_group, + gint *level, + GdkModifierType *consumed_modifiers); + G_END_DECLS #endif /* __GTK_PRIVATE_H__ */ |