Change button from int to uint32_t

Since you can't really have a negative button number.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 13 years ago committed by Kristian Høgsberg
parent da5b93c8d7
commit 5d66371743
  1. 2
      clients/clickdot.c
  2. 6
      clients/desktop-shell.c
  3. 2
      clients/dnd.c
  4. 2
      clients/eventdemo.c
  5. 2
      clients/flower.c
  6. 2
      clients/gears.c
  7. 2
      clients/resizor.c
  8. 2
      clients/tablet-shell.c
  9. 2
      clients/terminal.c
  10. 2
      clients/view.c
  11. 4
      clients/window.c
  12. 2
      clients/window.h
  13. 2
      src/compositor-x11.c

@ -110,7 +110,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
static void static void
button_handler(struct widget *widget, button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct clickdot *clickdot = data;

@ -256,7 +256,7 @@ panel_launcher_leave_handler(struct widget *widget,
static void static void
panel_launcher_button_handler(struct widget *widget, panel_launcher_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct panel_launcher *launcher;
@ -269,7 +269,7 @@ panel_launcher_button_handler(struct widget *widget,
static void static void
panel_button_handler(struct widget *widget, panel_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct panel *panel = data;
@ -481,7 +481,7 @@ unlock_dialog_redraw_handler(struct widget *widget, void *data)
static void static void
unlock_dialog_button_handler(struct widget *widget, unlock_dialog_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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 unlock_dialog *dialog = data;
struct desktop *desktop = dialog->desktop; struct desktop *desktop = dialog->desktop;

@ -361,7 +361,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag,
static void static void
dnd_button_handler(struct widget *widget, dnd_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct dnd *dnd = data;
int32_t x, y; int32_t x, y;

@ -211,7 +211,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
*/ */
static void static void
button_handler(struct widget *widget, struct input *input, uint32_t time, 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; int32_t x, y;

@ -142,7 +142,7 @@ motion_handler(struct widget *widget, struct input *input,
static void static void
button_handler(struct widget *widget, button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct flower *flower = data;

@ -251,7 +251,7 @@ motion_handler(struct widget *widget, struct input *input,
static void static void
button_handler(struct widget *widget, struct input *input, 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; struct gears *gears = data;

@ -178,7 +178,7 @@ show_menu(struct resizor *resizor, struct input *input, uint32_t time)
static void static void
button_handler(struct widget *widget, button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct resizor *resizor = data;

@ -217,7 +217,7 @@ lockscreen_draw(struct widget *widget, void *data)
static void static void
lockscreen_button_handler(struct widget *widget, lockscreen_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct lockscreen *lockscreen = data;

@ -2213,7 +2213,7 @@ keyboard_focus_handler(struct window *window,
static void static void
button_handler(struct widget *widget, button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct terminal *terminal = data;

@ -138,7 +138,7 @@ view_page_down(struct view *view)
static void static void
button_handler(struct widget *widget, struct input *input, uint32_t time, 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; struct view *view = data;

@ -1220,7 +1220,7 @@ frame_motion_handler(struct widget *widget,
static void static void
frame_button_handler(struct widget *widget, frame_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct frame *frame = data;
@ -2363,7 +2363,7 @@ menu_leave_handler(struct widget *widget, struct input *input, void *data)
static void static void
menu_button_handler(struct widget *widget, menu_button_handler(struct widget *widget,
struct input *input, uint32_t time, 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; struct menu *menu = data;

@ -190,7 +190,7 @@ typedef int (*widget_motion_handler_t)(struct widget *widget,
int32_t x, int32_t y, void *data); int32_t x, int32_t y, void *data);
typedef void (*widget_button_handler_t)(struct widget *widget, typedef void (*widget_button_handler_t)(struct widget *widget,
struct input *input, uint32_t time, struct input *input, uint32_t time,
int button, uint32_t state, uint32_t button, uint32_t state,
void *data); void *data);
struct window * struct window *

@ -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 *button_event =
(xcb_button_press_event_t *) event; (xcb_button_press_event_t *) event;
int button; uint32_t button;
switch (button_event->detail) { switch (button_event->detail) {
default: default:

Loading…
Cancel
Save