diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-31 13:45:48 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-31 13:53:44 +0800 |
commit | cb91643c976540fc8c9d46e12a8edcb73be53467 (patch) | |
tree | a0121d94b699a822bd74ec56478ca47a98ae7467 | |
parent | eb9dd321309d08708d65ad0c002238275c35c651 (diff) | |
download | emacs-cb91643c976540fc8c9d46e12a8edcb73be53467.tar.gz emacs-cb91643c976540fc8c9d46e12a8edcb73be53467.tar.bz2 emacs-cb91643c976540fc8c9d46e12a8edcb73be53467.zip |
Fix motion not being reported on GTK when mouse moves over toolbar
* src/gtkutil.c (xg_event_is_for_scrollbar): Make code
consistent between XI2 and Core Input.
-rw-r--r-- | src/gtkutil.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index c46a2b3a6a1..ea9c91d316b 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -4853,9 +4853,8 @@ xg_event_is_for_scrollbar (struct frame *f, const EVENT *event) && event->type == GenericEvent && (event->xgeneric.extension == FRAME_DISPLAY_INFO (f)->xi2_opcode) - && ((event->xgeneric.evtype == XI_ButtonPress - && xev->detail < 4) - || (event->xgeneric.evtype == XI_Motion))) + && (event->xgeneric.evtype == XI_ButtonPress + && xev->detail < 4)) || (event->type == ButtonPress && event->xbutton.button < 4))) #else @@ -4887,19 +4886,7 @@ 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 - && event->xgeneric.evtype == XI_Motion) - retval = retval || (grab && GTK_IS_SCROLLBAR (grab)); -#endif } #ifdef HAVE_XINPUT2 else if (f && ((FRAME_DISPLAY_INFO (f)->supports_xi2 |