From: Po Lu Date: Sat, 15 Jan 2022 01:40:28 +0000 (+0800) Subject: Fix native input when using core input events X-Git-Tag: emacs-29.0.90~3044 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9845f6b9aa6e5ea0b272987bbf629d3eb4dc0531;p=emacs.git 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. --- 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