Commit 6d033dfa authored by Peter Hutterer's avatar Peter Hutterer
parents 72f5758f 86c5fba0
...@@ -53,7 +53,7 @@ struct window { ...@@ -53,7 +53,7 @@ struct window {
int width, height; /* of window */ int width, height; /* of window */
/* sprite position */ /* sprite position */
int x, y; double x, y;
/* abs position */ /* abs position */
int absx, absy; int absx, absy;
...@@ -233,10 +233,10 @@ handle_event_motion(struct libinput_event *ev, struct window *w) ...@@ -233,10 +233,10 @@ handle_event_motion(struct libinput_event *ev, struct window *w)
double dx = libinput_event_pointer_get_dx(p), double dx = libinput_event_pointer_get_dx(p),
dy = libinput_event_pointer_get_dy(p); dy = libinput_event_pointer_get_dy(p);
w->x += (int)dx; w->x += dx;
w->y += (int)dy; w->y += dy;
w->x = clip(w->x, 0, w->width); w->x = clip(w->x, 0.0, w->width);
w->y = clip(w->y, 0, w->height); w->y = clip(w->y, 0.0, w->height);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment