Catch and ignore mouse buttons meant for horizontal scrolling

This commit is contained in:
Matthew Gyurgyik 2009-04-23 04:08:28 +02:00 committed by Christian Dywan
parent daf6ca74e7
commit db0c626ec1

View file

@ -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;