diff options
-rw-r--r-- | include/swaybar/input.h | 2 | ||||
-rw-r--r-- | swaybar/input.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/swaybar/input.h b/include/swaybar/input.h index 2d38f7a7..6557a29e 100644 --- a/include/swaybar/input.h +++ b/include/swaybar/input.h | |||
@@ -18,7 +18,7 @@ struct swaybar_pointer { | |||
18 | struct wl_cursor_image *cursor_image; | 18 | struct wl_cursor_image *cursor_image; |
19 | struct wl_surface *cursor_surface; | 19 | struct wl_surface *cursor_surface; |
20 | struct swaybar_output *current; | 20 | struct swaybar_output *current; |
21 | int x, y; | 21 | double x, y; |
22 | uint32_t serial; | 22 | uint32_t serial; |
23 | }; | 23 | }; |
24 | 24 | ||
diff --git a/swaybar/input.c b/swaybar/input.c index 7f68caec..aa6290fa 100644 --- a/swaybar/input.c +++ b/swaybar/input.c | |||
@@ -121,8 +121,8 @@ static void wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, | |||
121 | static void wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, | 121 | static void wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, |
122 | uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) { | 122 | uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) { |
123 | struct swaybar_seat *seat = data; | 123 | struct swaybar_seat *seat = data; |
124 | seat->pointer.x = wl_fixed_to_int(surface_x); | 124 | seat->pointer.x = wl_fixed_to_double(surface_x); |
125 | seat->pointer.y = wl_fixed_to_int(surface_y); | 125 | seat->pointer.y = wl_fixed_to_double(surface_y); |
126 | } | 126 | } |
127 | 127 | ||
128 | static bool check_bindings(struct swaybar *bar, uint32_t button, | 128 | static bool check_bindings(struct swaybar *bar, uint32_t button, |