summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-10-11 08:06:33 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-07-16 15:43:43 +0200
commit7b8c036f8fd1c351d6816250283d9651f625c4ef (patch)
treeef72fdc2468befc2d733503ae8e98c821ad3b0d1
parent747be0f4999bc9e855cc1f6a4b98ccd371835d49 (diff)
downloadgtk+-7b8c036f8fd1c351d6816250283d9651f625c4ef.tar.gz
eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
-rw-r--r--gtk/gtkeventcontrollerscroll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c
index 61f916782c..57991db1ae 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;