1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 05:30:45 -08:00

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.
This commit is contained in:
Po Lu 2021-12-21 19:25:26 +08:00
parent cf6dc1838a
commit 264589cdf7

View file

@ -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