[gnome-shell/wip/exalm/swipes: 1/2] swipeTracker: Use unaccelerated deltas
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/swipes: 1/2] swipeTracker: Use unaccelerated deltas
- Date: Sun, 28 Feb 2021 14:51:23 +0000 (UTC)
commit 5d38f54dbf5df71ba889cb2d9a969bdc1bb8bfbd
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sun Feb 28 18:59:31 2021 +0500
swipeTracker: Use unaccelerated deltas
Unaccelerated deltas make sure the gesture works the same regardless of how
fast the fingers move; this is awhat we were lready doing for scrolling.
js/ui/swipeTracker.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 1bd8a69c9d..df43541893 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -16,7 +16,7 @@ const TOUCHPAD_BASE_WIDTH = 400;
const EVENT_HISTORY_THRESHOLD_MS = 150;
const SCROLL_MULTIPLIER = 10;
-const SWIPE_MULTIPLIER = 0.5;
+const SWIPE_MULTIPLIER = 0.25;
const MIN_ANIMATION_DURATION = 100;
const MAX_ANIMATION_DURATION = 400;
@@ -135,7 +135,7 @@ const TouchpadSwipeGesture = GObject.registerClass({
let time = event.get_time();
let [x, y] = event.get_coords();
- let [dx, dy] = event.get_gesture_motion_delta();
+ let [dx, dy] = event.get_gesture_motion_delta_unaccelerated();
if (this._state === TouchpadState.NONE && dx === 0 && dy === 0)
return Clutter.EVENT_PROPAGATE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]