pixman_region32_contains_point() takes ints, so do not convert to
double.

Signed-off-by: Pekka Paalanen <[email protected]>
---
 src/shell.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 1ba0cfc..bfa1b29 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1660,11 +1660,13 @@ do_zoom(struct wl_seat *seat, uint32_t time, uint32_t 
key, uint32_t axis,
        struct weston_compositor *compositor = ws->compositor;
        struct weston_output *output;
        float maximum_level, increment;
+       int x, y;
+
+       x = wl_fixed_to_int(seat->pointer->x);
+       y = wl_fixed_to_int(seat->pointer->y);
 
        wl_list_for_each(output, &compositor->output_list, link) {
-               if (pixman_region32_contains_point(&output->region,
-                                                  
wl_fixed_to_double(seat->pointer->x),
-                                                  
wl_fixed_to_double(seat->pointer->y),
+               if (pixman_region32_contains_point(&output->region, x, y,
                                                   NULL)) {
                        if (key == KEY_PAGEUP)
                                increment = output->zoom.increment;
-- 
1.7.3.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to