From: Matthew Gyurgyik Date: Thu, 23 Apr 2009 02:08:28 +0000 (+0200) Subject: Catch and ignore mouse buttons meant for horizontal scrolling X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db0c626ec181f98c2afac87e681d55adf842f8e2;p=midori Catch and ignore mouse buttons meant for horizontal scrolling --- 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;