From 4560b6b6b4d19a65350591d9bbc83df1cdc7bd13 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 30 Mar 2012 16:38:39 +0300 Subject: [PATCH] server: fix button signedness in wl_grab_interface wl_input_device::grab_button is unsigned but the button parameter to wl_grab_interface::button is signed. This lead to a warning in data-device.c. The button number is unsigned in the protocol, so make it unsigned in the wl_grab_interface API, too. Fixes the compiler warning "comparison between signed and unsigned integer expressions". Signed-off-by: Pekka Paalanen --- src/data-device.c | 2 +- src/wayland-server.c | 2 +- src/wayland-server.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data-device.c b/src/data-device.c index 797fdd7..03997f1 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -248,7 +248,7 @@ data_device_end_drag_grab(struct wl_input_device *device, uint32_t time) static void drag_grab_button(struct wl_pointer_grab *grab, - uint32_t time, int32_t button, int32_t state) + uint32_t time, uint32_t button, int32_t state) { struct wl_input_device *device = container_of(grab, struct wl_input_device, drag_grab); diff --git a/src/wayland-server.c b/src/wayland-server.c index 0c0d028..8c7323d 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -474,7 +474,7 @@ default_grab_motion(struct wl_pointer_grab *grab, static void default_grab_button(struct wl_pointer_grab *grab, - uint32_t time, int32_t button, int32_t state) + uint32_t time, uint32_t button, int32_t state) { struct wl_input_device *device = grab->input_device; struct wl_resource *resource; diff --git a/src/wayland-server.h b/src/wayland-server.h index 1a0878b..2e52244 100644 --- a/src/wayland-server.h +++ b/src/wayland-server.h @@ -143,7 +143,7 @@ struct wl_pointer_grab_interface { void (*motion)(struct wl_pointer_grab *grab, uint32_t time, int32_t x, int32_t y); void (*button)(struct wl_pointer_grab *grab, - uint32_t time, int32_t button, int32_t state); + uint32_t time, uint32_t button, int32_t state); }; struct wl_pointer_grab { -- 2.7.4