sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 679c7b397c4e9dfdc69d6c67c523494dfe987f60
parent c805e42635f3935ccf0ce927143433b94c78a3e7
Author: David Eklov <david.eklov@gmail.com>
Date:   Mon, 11 Jul 2016 00:03:15 -0500

Use int instead of wl_fixed_t for mouse coordinates

Diffstat:
Minclude/client/window.h | 6+++---
Mwayland/window.c | 4++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/client/window.h b/include/client/window.h @@ -28,10 +28,10 @@ struct cursor { }; struct pointer_input { - wl_fixed_t last_x; - wl_fixed_t last_y; + int last_x; + int last_y; - void (*notify)(struct window *window, wl_fixed_t x, wl_fixed_t y, uint32_t button); + void (*notify)(struct window *window, int x, int y, uint32_t button); }; struct window { diff --git a/wayland/window.c b/wayland/window.c @@ -32,8 +32,8 @@ static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w) { struct window *window = data; - window->pointer_input.last_x = sx_w; - window->pointer_input.last_y = sy_w; + window->pointer_input.last_x = wl_fixed_to_int(sx_w); + window->pointer_input.last_y = wl_fixed_to_int(sy_w); } static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial,