[PATCH wayland v3 2/5] Use unsigned for key/button up/down state in grabs

Daniel Stone daniel at fooishbar.org
Fri May 4 03:21:20 PDT 2012


Since we just use it as a simple boolean flag, might as well convert it
to unsigned.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 src/data-device.c    |    2 +-
 src/wayland-server.c |    4 ++--
 src/wayland-server.h |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

v3: No changes.

diff --git a/src/data-device.c b/src/data-device.c
index 46e5549..7c26809 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -253,7 +253,7 @@ data_device_end_drag_grab(struct wl_input_device *device)
 
 static void
 drag_grab_button(struct wl_pointer_grab *grab,
-		 uint32_t time, uint32_t button, int32_t state)
+		 uint32_t time, uint32_t button, uint32_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 d0c31bf..678ab39 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -495,7 +495,7 @@ default_grab_motion(struct wl_pointer_grab *grab,
 
 static void
 default_grab_button(struct wl_pointer_grab *grab,
-		    uint32_t time, uint32_t button, int32_t state)
+		    uint32_t time, uint32_t button, uint32_t state)
 {
 	struct wl_input_device *device = grab->input_device;
 	struct wl_resource *resource;
@@ -524,7 +524,7 @@ static const struct wl_pointer_grab_interface
 
 static void
 default_grab_key(struct wl_keyboard_grab *grab,
-		 uint32_t time, uint32_t key, int32_t state)
+		 uint32_t time, uint32_t key, uint32_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 6be6897..ec4bd38 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -189,7 +189,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, uint32_t button, int32_t state);
+		       uint32_t time, uint32_t button, uint32_t state);
 };
 
 struct wl_pointer_grab {
@@ -202,7 +202,7 @@ struct wl_pointer_grab {
 struct wl_keyboard_grab;
 struct wl_keyboard_grab_interface {
 	void (*key)(struct wl_keyboard_grab *grab, uint32_t time,
-		    uint32_t key, int32_t state);
+		    uint32_t key, uint32_t state);
 };
 
 struct wl_keyboard_grab {
-- 
1.7.10



More information about the wayland-devel mailing list