[PATCH 2/3] compositor: fix option types

Pekka Paalanen ppaalanen at gmail.com
Tue Mar 13 01:11:50 PDT 2012


On Mon, 12 Mar 2012 19:06:39 -0300
Tiago Vignatti <tiago.vignatti at intel.com> wrote:

> Basically all integer options should be set as unsigned integers instead.
> Funny that WESTON_OPTION_INTEGER is not being used anywhere now.
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
>  clients/eventdemo.c      |    8 ++++----
>  src/compositor-drm.c     |    4 ++--
>  src/compositor-openwfd.c |    4 ++--
>  src/compositor-wayland.c |    4 ++--
>  src/compositor-x11.c     |    6 +++---
>  src/compositor.c         |    2 +-
>  6 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/clients/eventdemo.c b/clients/eventdemo.c
> index 5d0cc90..3ed0840 100644
> --- a/clients/eventdemo.c
> +++ b/clients/eventdemo.c
> @@ -318,10 +318,10 @@ eventdemo_create(struct display *d)
>   */
>  static const struct weston_option eventdemo_options[] = {
>  	{ WESTON_OPTION_STRING, "title", 0, &title },
> -	{ WESTON_OPTION_INTEGER, "width", 'w', &width },
> -	{ WESTON_OPTION_INTEGER, "height", 'h', &height },
> -	{ WESTON_OPTION_INTEGER, "max-width", 0, &width_max },
> -	{ WESTON_OPTION_INTEGER, "max-height", 0, &height_max },
> +	{ WESTON_OPTION_UNSIGNED_INTEGER, "width", 'w', &width },
> +	{ WESTON_OPTION_UNSIGNED_INTEGER, "height", 'h', &height },
> +	{ WESTON_OPTION_UNSIGNED_INTEGER, "max-width", 0, &width_max },
> +	{ WESTON_OPTION_UNSIGNED_INTEGER, "max-height", 0, &height_max },
>  	{ WESTON_OPTION_BOOLEAN, "no-border", 'b', &noborder },
>  	{ WESTON_OPTION_BOOLEAN, "log-redraw", '0', &log_redraw },
>  	{ WESTON_OPTION_BOOLEAN, "log-resize", '0', &log_resize },

Just a note, these '0' in the context do not look right...

Thanks,
pq


More information about the wayland-devel mailing list