emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 94f3424381 2/2: Fix some issues with GTK native input and modifie


From: Po Lu
Subject: master 94f3424381 2/2: Fix some issues with GTK native input and modifiers on GTK 2
Date: Wed, 9 Mar 2022 08:34:39 -0500 (EST)

branch: master
commit 94f342438144c99bec90cc219283df2033866576
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 src/gtkutil.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 4f9907f795..bf95c96642 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]