[PATCH weston v3 3/8] Change button from int to uint32_t

Kristian Høgsberg hoegsberg at gmail.com
Mon May 7 10:01:53 PDT 2012


On Fri, May 04, 2012 at 11:21:55AM +0100, Daniel Stone wrote:
> Since you can't really have a negative button number.

Applied, thanks.
Kristian

> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> ---
>  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(-)
> 
> v3: No changes.
> 
> diff --git a/clients/clickdot.c b/clients/clickdot.c
> index 1930dfe..6d70618 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 0a6341a..3617cf9 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 1d1f592..54fc1f2 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 bda9630..6ecb7d7 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 7e8cba7..0827c14 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 4dea8f2..9d0fba1 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 37c400b..dfbbf59 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 9ba9701..3797f88 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 659763f..fd6fb5e 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 c17bb12..1937fc1 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 ce67e69..2657140 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 d2abb3d..1dd5f0c 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 304a4d5..d363572 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:
> -- 
> 1.7.10
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list