From: Po Lu Date: Tue, 21 Dec 2021 11:25:26 +0000 (+0800) Subject: Fix xg_event_is_scrollbar for grab-related events on XI2 X-Git-Tag: emacs-29.0.90~3528 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=264589cdf762d015c8ecd102afb7eb61dc0ad65b;p=emacs.git Fix xg_event_is_scrollbar for grab-related events on XI2 * src/gtkutil.c (xg_event_is_for_scrollbar): Don't return true if event coordinates are outside the frame on XInput 2. --- diff --git a/src/gtkutil.c b/src/gtkutil.c index 7370a795c08..0f1c1103649 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -4805,7 +4805,13 @@ xg_event_is_for_scrollbar (struct frame *f, const EVENT *event) #else gwin = gdk_display_get_window_at_pointer (gdpy, NULL, NULL); #endif +#ifndef HAVE_XINPUT2 retval = gwin != gtk_widget_get_window (f->output_data.xp->edit_widget); +#else + retval = (gwin + && (gwin + != gtk_widget_get_window (f->output_data.xp->edit_widget))); +#endif #ifdef HAVE_XINPUT2 GtkWidget *grab = gtk_grab_get_current (); if (event->type == GenericEvent