]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix native input when using core input events
authorPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 01:40:28 +0000 (09:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 01:40:28 +0000 (09:40 +0800)
* src/gtkutil.c (xg_filter_key): Test for core key press events
correctly.
* src/xterm.c (handle_one_xevent): Also check for KeyRelease
events.

src/gtkutil.c
src/xterm.c

index 36ed55bc0397d0ed3c31776ba2582af79b5f8d58..d17a6970b8de7b8523ec29642079524378fbd69e 100644 (file)
@@ -6262,7 +6262,7 @@ xg_widget_key_press_event_cb (GtkWidget *widget, GdkEvent *event,
 bool
 xg_filter_key (struct frame *frame, XEvent *xkey)
 {
-  GdkEvent *xg_event = gdk_event_new ((xkey->type == ButtonPress
+  GdkEvent *xg_event = gdk_event_new ((xkey->type == KeyPress
 #ifdef HAVE_XINPUT2
                                       || (xkey->type == GenericEvent
                                           && xkey->xgeneric.evtype == XI_KeyPress)
index 103eb75a4607ce2b0050d91e9616a222bf518700..0e93c992751d1aab8e135d8ab435aa7819e3840d 100644 (file)
@@ -8373,6 +8373,7 @@ x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
 #ifdef USE_GTK
     }
   else if (f1 && (event->type == KeyPress
+                 || event->type == KeyRelease
 #ifdef HAVE_XINPUT2
                  || xinput_event
 #endif