diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-15 09:40:28 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-15 09:40:28 +0800 |
commit | 9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531 (patch) | |
tree | 2a5697bf69ef5088d7a6ef0ccdebb60c9a9cbf8a | |
parent | 1f5f3b7e8955154c28342e63ba1216f83ff6d73d (diff) | |
download | emacs-9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531.tar.gz |
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.
-rw-r--r-- | src/gtkutil.c | 2 | ||||
-rw-r--r-- | src/xterm.c | 1 |
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, 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) 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) #ifdef USE_GTK } else if (f1 && (event->type == KeyPress + || event->type == KeyRelease #ifdef HAVE_XINPUT2 || xinput_event #endif |