diff options
author | Timm Bäder <mail@baedert.org> | 2017-10-11 08:06:33 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-10-11 08:50:21 +0200 |
commit | 804476a07f8b3a93aa706386cfe14826c34cc590 (patch) | |
tree | ce7c034c0119b88da813680376de70df445ca80e /gtk/gtkeventcontrollerscroll.c | |
parent | ac7e1081b5a9bdbf105462127ac6c3ee12698fd4 (diff) | |
download | gtk+-804476a07f8b3a93aa706386cfe14826c34cc590.tar.gz |
eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
Diffstat (limited to 'gtk/gtkeventcontrollerscroll.c')
-rw-r--r-- | gtk/gtkeventcontrollerscroll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index a250bfb8aa..407f254c8b 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; |