diff options
Diffstat (limited to 'tools/event-gui.c')
-rw-r--r-- | tools/event-gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/event-gui.c b/tools/event-gui.c index 3ce7418..678e75b 100644 --- a/tools/event-gui.c +++ b/tools/event-gui.c @@ -62,8 +62,8 @@ struct window { int absx, absy; /* scroll bar positions */ - int vx, vy; - int hx, hy; + double vx, vy; + double hx, hy; /* touch positions */ struct touch touches[32]; @@ -363,7 +363,7 @@ handle_event_axis(struct libinput_event *ev, struct window *w) LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)) { value = libinput_event_pointer_get_axis_value(p, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); - w->vy += (int)value; + w->vy += value; w->vy = clip(w->vy, 0, w->height); } @@ -371,7 +371,7 @@ handle_event_axis(struct libinput_event *ev, struct window *w) LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) { value = libinput_event_pointer_get_axis_value(p, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); - w->hx += (int)value; + w->hx += value; w->hx = clip(w->hx, 0, w->width); } } |