SwipeScroll: Only allow starting with the left button

Currently we allow starting swipe-scroll with any mouse button
which is weird from an UI pov and causes inconsistencies with
event handling.

https://bugzilla.gnome.org/show_bug.cgi?id=647186
This commit is contained in:
Adel Gadllah 2011-04-23 09:45:58 +02:00
parent 6ce07abf50
commit c450120409

View File

@ -281,7 +281,8 @@ Overview.prototype = {
},
_onButtonPress: function(actor, event) {
if (this._scrollDirection == SwipeScrollDirection.NONE)
if (this._scrollDirection == SwipeScrollDirection.NONE
|| event.get_button() != 1)
return;
let [stageX, stageY] = event.get_coords();