]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix xg_event_is_scrollbar for grab-related events on XI2
authorPo Lu <luangruo@yahoo.com>
Tue, 21 Dec 2021 11:25:26 +0000 (19:25 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 21 Dec 2021 11:26:40 +0000 (19:26 +0800)
* src/gtkutil.c (xg_event_is_for_scrollbar): Don't return true
if event coordinates are outside the frame on XInput 2.

src/gtkutil.c

index 7370a795c08d0343e3d472ebc59f12be0f546820..0f1c1103649b236d948d01f74bac3e56cd214f8d 100644 (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