[PATCH weston 1/3] Change key/button grab bindings to take unsigned state

Daniel Stone daniel at fooishbar.org
Tue May 1 12:30:38 PDT 2012


'state' here meaning 'is it up or down?', obviously.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 src/shell.c |   10 +++++-----
 src/util.c  |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 6b2ccbc..6b8719c 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -326,7 +326,7 @@ move_grab_motion(struct wl_pointer_grab *grab,
 
 static void
 move_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 shell_grab *shell_grab = container_of(grab, struct shell_grab,
 						    grab);
@@ -566,7 +566,7 @@ resize_grab_motion(struct wl_pointer_grab *grab,
 
 static void
 resize_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 weston_resize_grab *resize = (struct weston_resize_grab *) grab;
 	struct wl_input_device *device = grab->input_device;
@@ -1041,7 +1041,7 @@ popup_grab_motion(struct wl_pointer_grab *grab,
 
 static void
 popup_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_resource *resource;
 	struct shell_surface *shsurf =
@@ -1688,7 +1688,7 @@ rotate_grab_motion(struct wl_pointer_grab *grab,
 
 static void
 rotate_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 rotate_grab *rotate =
 		container_of(grab, struct rotate_grab, base.grab);
@@ -2380,7 +2380,7 @@ switcher_destroy(struct switcher *switcher, uint32_t time)
 
 static void
 switcher_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 switcher *switcher = container_of(grab, struct switcher, grab);
 	struct weston_input_device *device =
diff --git a/src/util.c b/src/util.c
index 9943820..78f6980 100644
--- a/src/util.c
+++ b/src/util.c
@@ -249,7 +249,7 @@ struct binding_keyboard_grab {
 
 static void
 binding_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 binding_keyboard_grab *b =
 		container_of(grab, struct binding_keyboard_grab, grab);
-- 
1.7.10



More information about the wayland-devel mailing list