From 5d663717434d1a61583b948f414f848b883cc5b0 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 4 May 2012 11:21:55 +0100 Subject: [PATCH] Change button from int to uint32_t Since you can't really have a negative button number. Signed-off-by: Daniel Stone --- clients/clickdot.c | 2 +- clients/desktop-shell.c | 6 +++--- clients/dnd.c | 2 +- clients/eventdemo.c | 2 +- clients/flower.c | 2 +- clients/gears.c | 2 +- clients/resizor.c | 2 +- clients/tablet-shell.c | 2 +- clients/terminal.c | 2 +- clients/view.c | 2 +- clients/window.c | 4 ++-- clients/window.h | 2 +- src/compositor-x11.c | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/clients/clickdot.c b/clients/clickdot.c index 1930dfe6..6d70618c 100644 --- a/clients/clickdot.c +++ b/clients/clickdot.c @@ -110,7 +110,7 @@ key_handler(struct window *window, struct input *input, uint32_t time, static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct clickdot *clickdot = data; diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 0a6341a1..3617cf99 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -256,7 +256,7 @@ panel_launcher_leave_handler(struct widget *widget, static void panel_launcher_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct panel_launcher *launcher; @@ -269,7 +269,7 @@ panel_launcher_button_handler(struct widget *widget, static void panel_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct panel *panel = data; @@ -481,7 +481,7 @@ unlock_dialog_redraw_handler(struct widget *widget, void *data) static void unlock_dialog_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct unlock_dialog *dialog = data; struct desktop *desktop = dialog->desktop; diff --git a/clients/dnd.c b/clients/dnd.c index 1d1f592d..54fc1f21 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -361,7 +361,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag, static void dnd_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct dnd *dnd = data; int32_t x, y; diff --git a/clients/eventdemo.c b/clients/eventdemo.c index bda96300..6ecb7d7d 100644 --- a/clients/eventdemo.c +++ b/clients/eventdemo.c @@ -211,7 +211,7 @@ key_handler(struct window *window, struct input *input, uint32_t time, */ static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { int32_t x, y; diff --git a/clients/flower.c b/clients/flower.c index 7e8cba75..0827c14a 100644 --- a/clients/flower.c +++ b/clients/flower.c @@ -142,7 +142,7 @@ motion_handler(struct widget *widget, struct input *input, static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct flower *flower = data; diff --git a/clients/gears.c b/clients/gears.c index 4dea8f2f..9d0fba1b 100644 --- a/clients/gears.c +++ b/clients/gears.c @@ -251,7 +251,7 @@ motion_handler(struct widget *widget, struct input *input, static void button_handler(struct widget *widget, struct input *input, - uint32_t time, int button, uint32_t state, void *data) + uint32_t time, uint32_t button, uint32_t state, void *data) { struct gears *gears = data; diff --git a/clients/resizor.c b/clients/resizor.c index 37c400be..dfbbf59f 100644 --- a/clients/resizor.c +++ b/clients/resizor.c @@ -178,7 +178,7 @@ show_menu(struct resizor *resizor, struct input *input, uint32_t time) static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct resizor *resizor = data; diff --git a/clients/tablet-shell.c b/clients/tablet-shell.c index 9ba9701c..3797f887 100644 --- a/clients/tablet-shell.c +++ b/clients/tablet-shell.c @@ -217,7 +217,7 @@ lockscreen_draw(struct widget *widget, void *data) static void lockscreen_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct lockscreen *lockscreen = data; diff --git a/clients/terminal.c b/clients/terminal.c index 659763fc..fd6fb5ec 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -2213,7 +2213,7 @@ keyboard_focus_handler(struct window *window, static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct terminal *terminal = data; diff --git a/clients/view.c b/clients/view.c index c17bb123..1937fc1e 100644 --- a/clients/view.c +++ b/clients/view.c @@ -138,7 +138,7 @@ view_page_down(struct view *view) static void button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct view *view = data; diff --git a/clients/window.c b/clients/window.c index ce67e691..26571409 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1220,7 +1220,7 @@ frame_motion_handler(struct widget *widget, static void frame_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct frame *frame = data; @@ -2363,7 +2363,7 @@ menu_leave_handler(struct widget *widget, struct input *input, void *data) static void menu_button_handler(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, void *data) + uint32_t button, uint32_t state, void *data) { struct menu *menu = data; diff --git a/clients/window.h b/clients/window.h index d2abb3d3..1dd5f0cf 100644 --- a/clients/window.h +++ b/clients/window.h @@ -190,7 +190,7 @@ typedef int (*widget_motion_handler_t)(struct widget *widget, int32_t x, int32_t y, void *data); typedef void (*widget_button_handler_t)(struct widget *widget, struct input *input, uint32_t time, - int button, uint32_t state, + uint32_t button, uint32_t state, void *data); struct window * diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 304a4d5e..d3635729 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -485,7 +485,7 @@ x11_compositor_deliver_button_event(struct x11_compositor *c, { xcb_button_press_event_t *button_event = (xcb_button_press_event_t *) event; - int button; + uint32_t button; switch (button_event->detail) { default: