summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2009-11-28 21:47:36 -0500
committerMatthias Clasen <mclasen@redhat.com>2009-11-28 21:47:36 -0500
commitc08ed56f13bafff56fe3a827baf78bb0d2a1f872 (patch)
tree20a18b45b4bd58bf6b551436860152ab416062e4 /gtk/gtkimcontextsimple.c
parentbbb4e4910bca120747630c794263f6dcca7beadb (diff)
downloadgtk+-c08ed56f13bafff56fe3a827baf78bb0d2a1f872.tar.gz
Allow holding compose key while entering a sequence
This broke when we started allowing Super, Hyper and Meta as accel modifiers. See bug 601959.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 523f771dab..2f4ddd0e66 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -859,8 +859,11 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
hex_keyval = canonical_hex_keyval (event);
/* If we are already in a non-hex sequence, or
- * this keystroke is not hex modifiers + hex digit, don't filter
- * key events with accelerator modifiers held down.
+ * this keystroke is not hex modifiers + hex digit, don't filter
+ * key events with accelerator modifiers held down. We only treat
+ * Control and Alt as accel modifiers here, since Super, Hyper and
+ * Meta are often co-located with Mode_Switch, Multi_Key or
+ * ISO_Level3_Switch.
*/
if (!have_hex_mods ||
(n_compose > 0 && !context_simple->in_hex_sequence) ||
@@ -868,7 +871,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
(context_simple->in_hex_sequence && !hex_keyval &&
!is_hex_start && !is_hex_end && !is_escape && !is_backspace))
{
- if (event->state & (gtk_accelerator_get_default_mod_mask () & ~GDK_SHIFT_MASK) ||
+ if (event->state & (GDK_MOD1_MASK | GDK_CONTROL_MASK) ||
(context_simple->in_hex_sequence && context_simple->modifiers_dropped &&
(event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||