diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 09270914e..fedee72d5 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -478,6 +478,7 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({ this._dx = 0; this._dy = 0; actor.connect('captured-event', this._handleEvent.bind(this)); + this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'}); }, _checkActivated() { @@ -515,7 +516,11 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({ // Scale deltas up a bit to make it feel snappier this._dx += dx * 2; - this._dy += dy * 2; + if(!(this._touchpadSettings.get_boolean('natural-scroll'))) + this._dy -= dy * 2; + else + this._dy += dy * 2; + this.emit('motion', this._dx, this._dy); } else { if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||