From: Po Lu Date: Wed, 9 Mar 2022 13:33:48 +0000 (+0800) Subject: Fix some issues with GTK native input and modifiers on GTK 2 X-Git-Tag: emacs-29.0.90~1940 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94f342438144c99bec90cc219283df2033866576;p=emacs.git Fix some issues with GTK native input and modifiers on GTK 2 * src/gtkutil.c (xg_widget_key_press_event_cb): Manually ignore modifier keys on GTK 2. --- diff --git a/src/gtkutil.c b/src/gtkutil.c index 4f9907f795a..bf95c966421 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -6252,6 +6252,13 @@ xg_widget_key_press_event_cb (GtkWidget *widget, GdkEvent *event, if (event->key.is_modifier) goto done; +#ifndef HAVE_GTK3 + /* FIXME: event->key.is_modifier is not accurate on GTK 2. */ + + if (keysym >= GDK_KEY_Shift_L && keysym <= GDK_KEY_Hyper_R) + goto done; +#endif + /* First deal with keysyms which have defined translations to characters. */ if (keysym >= 32 && keysym < 128)