[libadwaita/libadwaita-1-0] swipe-tracker: Remove scroll multiplier for GTK 4.7.0+



commit b21029307ad9a7f40442674e7a19ddf29d937ee0
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Jul 22 21:23:46 2022 +0400

    swipe-tracker: Remove scroll multiplier for GTK 4.7.0+
    
    Deltas don't contain it anymore.
    
    
    (cherry picked from commit 02f61b58f11ce23f9d48449d1c10e074c77723af)
    
    (cherry picked from commit 01e1be93bfb85df4d03d96d59914a8496ab09cb1)

 src/adw-swipe-tracker.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-swipe-tracker.c b/src/adw-swipe-tracker.c
index e874407d..ac647b3f 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -15,7 +15,6 @@
 #define TOUCHPAD_BASE_DISTANCE_H 400
 #define TOUCHPAD_BASE_DISTANCE_V 300
 #define EVENT_HISTORY_THRESHOLD_MS 150
-#define SCROLL_MULTIPLIER 10
 #define MIN_ANIMATION_DURATION 100
 #define MAX_ANIMATION_DURATION 400
 #define VELOCITY_THRESHOLD_TOUCH 0.3
@@ -29,6 +28,12 @@
 #define DRAG_THRESHOLD_DISTANCE 16
 #define EPSILON 0.005
 
+#if GTK_CHECK_VERSION (4, 7, 0)
+#define SCROLL_MULTIPLIER 1
+#else
+#define SCROLL_MULTIPLIER 10
+#endif
+
 #define SIGN(x) ((x) > 0.0 ? 1.0 : ((x) < 0.0 ? -1.0 : 0.0))
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]