[evince] view: ignore higher mouse buttons on links
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] view: ignore higher mouse buttons on links
- Date: Mon, 30 Sep 2019 01:03:35 +0000 (UTC)
commit 812eeeecb3da18ff8369cd3571169bee1f9cec9a
Author: Jason Crain <jcrain src gnome org>
Date: Thu Jun 20 00:29:36 2019 -0600
view: ignore higher mouse buttons on links
Currently, releasing the mouse forward and back buttons over a link will
follow the link. Since these buttons are used for history navigation,
this can result in unexpectedly following a link. Only process primary
and secondary button release events for links.
Fixes #1152
libview/ev-view.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 6bb8de2d..21c29804 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5924,7 +5924,9 @@ ev_view_button_release_event (GtkWidget *widget,
(GSourceFunc)ev_view_scroll_drag_release, view);
}
- if (view->document && !view->drag_info.in_drag && view->pressed_button != 3) {
+ if (view->document && !view->drag_info.in_drag &&
+ (view->pressed_button == GDK_BUTTON_PRIMARY ||
+ view->pressed_button == GDK_BUTTON_MIDDLE)) {
link = ev_view_get_link_at_location (view, event->x, event->y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]