[gtk+] eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps



commit 804476a07f8b3a93aa706386cfe14826c34cc590
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 11 08:06:33 2017 +0200

    eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
    
    The > 1 meant it only emits the signal for -2/+2 steps.

 gtk/gtkeventcontrollerscroll.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c
index a250bfb..407f254 100644
--- a/gtk/gtkeventcontrollerscroll.c
+++ b/gtk/gtkeventcontrollerscroll.c
@@ -239,14 +239,14 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
           scroll->cur_dy += dy;
           dx = dy = 0;
 
-          if (ABS (scroll->cur_dx) > 1)
+          if (ABS (scroll->cur_dx) >= 1)
             {
               steps = trunc (scroll->cur_dx);
               scroll->cur_dx -= steps;
               dx = steps;
             }
 
-          if (ABS (scroll->cur_dy) > 1)
+          if (ABS (scroll->cur_dy) >= 1)
             {
               steps = trunc (scroll->cur_dy);
               scroll->cur_dy -= steps;


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