From db0c626ec181f98c2afac87e681d55adf842f8e2 Mon Sep 17 00:00:00 2001 From: Matthew Gyurgyik Date: Thu, 23 Apr 2009 04:08:28 +0200 Subject: [PATCH] Catch and ignore mouse buttons meant for horizontal scrolling --- midori/midori-view.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/midori/midori-view.c b/midori/midori-view.c index 0c4d203b..f5d9cebe 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -814,6 +814,17 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, case 9: midori_view_go_forward (view); return TRUE; + /* + * On some fancier mice the scroll wheel can be used to scroll horizontally. + * A middle click usually registers both a middle click (2) and a + * horizontal scroll (11 or 12). + * We catch horizontal scrolls and ignore them to prevent middle clicks from + * accidentally being interpreted as first button clicks. + */ + case 11: + return TRUE; + case 12: + return TRUE; } return FALSE;