summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-06-25 13:37:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-06-25 13:37:02 +1000
commit6d033dfa14822a9c379a8285813fc5d6f494aa59 (patch)
tree61810287a234bd1ccbd670a5f4e45e9ff1c72530
parent72f5758f2adca6be752ff336d8cf77a23959e7fb (diff)
parent86c5fba0d294fba1d09224b48ff1ead9a5d5dad5 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/wayland/libinput
-rw-r--r--tools/event-gui.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 234ece93..d65a8d15 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -53,7 +53,7 @@ struct window {
int width, height; /* of window */
/* sprite position */
- int x, y;
+ double x, y;
/* abs position */
int absx, absy;
@@ -233,10 +233,10 @@ handle_event_motion(struct libinput_event *ev, struct window *w)
double dx = libinput_event_pointer_get_dx(p),
dy = libinput_event_pointer_get_dy(p);
- w->x += (int)dx;
- w->y += (int)dy;
- w->x = clip(w->x, 0, w->width);
- w->y = clip(w->y, 0, w->height);
+ w->x += dx;
+ w->y += dy;
+ w->x = clip(w->x, 0.0, w->width);
+ w->y = clip(w->y, 0.0, w->height);
}
static void