diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-02-01 18:58:13 +0100 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-02-01 18:58:13 +0100 |
| commit | dea21c71fda0422fa7cc82c1eb7882bec2971257 (patch) | |
| tree | 66ca6253e253da6029df2981659557439af709ed /swaybar/input.c | |
| parent | 2baf7beb92c45c19e20d1dca54bff7a0c243703f (diff) | |
Do not truncate pointer coordinates to int.
This increases the precision of the clicks when using i3bar.
Diffstat (limited to 'swaybar/input.c')
| -rw-r--r-- | swaybar/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, static void wl_pointer_motion(void *data, struct wl_pointer *wl_pointer, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) { struct swaybar_seat *seat = data; - seat->pointer.x = wl_fixed_to_int(surface_x); - seat->pointer.y = wl_fixed_to_int(surface_y); + seat->pointer.x = wl_fixed_to_double(surface_x); + seat->pointer.y = wl_fixed_to_double(surface_y); } static bool check_bindings(struct swaybar *bar, uint32_t button, |
