eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps

The > 1 meant it only emits the signal for -2/+2 steps.
This commit is contained in:
Timm Bäder 2017-10-11 08:06:33 +02:00
parent ac7e1081b5
commit 804476a07f

View File

@ -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;