Catch and ignore mouse buttons meant for horizontal scrolling
This commit is contained in:
parent
daf6ca74e7
commit
db0c626ec1
1 changed files with 11 additions and 0 deletions
|
@ -814,6 +814,17 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view,
|
||||||
case 9:
|
case 9:
|
||||||
midori_view_go_forward (view);
|
midori_view_go_forward (view);
|
||||||
return TRUE;
|
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;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue