aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-15 09:40:28 +0800
committerPo Lu2022-01-15 09:40:28 +0800
commit9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531 (patch)
tree2a5697bf69ef5088d7a6ef0ccdebb60c9a9cbf8a /src
parent1f5f3b7e8955154c28342e63ba1216f83ff6d73d (diff)
downloademacs-9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531.tar.gz
emacs-9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531.zip
Fix native input when using core input events
* src/gtkutil.c (xg_filter_key): Test for core key press events correctly. * src/xterm.c (handle_one_xevent): Also check for KeyRelease events.
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/xterm.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 36ed55bc039..d17a6970b8d 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -6262,7 +6262,7 @@ xg_widget_key_press_event_cb (GtkWidget *widget, GdkEvent *event,
6262bool 6262bool
6263xg_filter_key (struct frame *frame, XEvent *xkey) 6263xg_filter_key (struct frame *frame, XEvent *xkey)
6264{ 6264{
6265 GdkEvent *xg_event = gdk_event_new ((xkey->type == ButtonPress 6265 GdkEvent *xg_event = gdk_event_new ((xkey->type == KeyPress
6266#ifdef HAVE_XINPUT2 6266#ifdef HAVE_XINPUT2
6267 || (xkey->type == GenericEvent 6267 || (xkey->type == GenericEvent
6268 && xkey->xgeneric.evtype == XI_KeyPress) 6268 && xkey->xgeneric.evtype == XI_KeyPress)
diff --git a/src/xterm.c b/src/xterm.c
index 103eb75a460..0e93c992751 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8373,6 +8373,7 @@ x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
8373#ifdef USE_GTK 8373#ifdef USE_GTK
8374 } 8374 }
8375 else if (f1 && (event->type == KeyPress 8375 else if (f1 && (event->type == KeyPress
8376 || event->type == KeyRelease
8376#ifdef HAVE_XINPUT2 8377#ifdef HAVE_XINPUT2
8377 || xinput_event 8378 || xinput_event
8378#endif 8379#endif