[PATCH weston] compositor-x11: Simplify width and height assignment.

Scott Moreau oreaus at gmail.com
Sun Nov 4 16:52:07 PST 2012


On Sun, Nov 4, 2012 at 5:47 PM, Scott Moreau <oreaus at gmail.com> wrote:

> This code was confusing and the fallback paths are never used here. The
> fallback is already set accordingly when configured_output_list is built.
> ---
>
> This patch probably depends on "compisitor-x11: Handle --fullscreen
> better."
>
>  src/compositor-x11.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/compositor-x11.c b/src/compositor-x11.c
> index 75de857..e410ab2 100644
> --- a/src/compositor-x11.c
> +++ b/src/compositor-x11.c
> @@ -1201,8 +1201,8 @@ x11_compositor_create(struct wl_display *display,
>         if (x11_input_create(c, no_input) < 0)
>                 goto err_egl;
>
> -       width = option_width ? option_width : 1024;
> -       height = option_height ? option_height : 640;
> +       width = option_width;
> +       height = option_height;
>         count = option_count ? option_count : 1;
>
>         wl_list_for_each(o, &configured_output_list, link) {
> @@ -1211,9 +1211,9 @@ x11_compositor_create(struct wl_display *display,
>                         o->height = c->screen->height_in_pixels;
>                 }
>                 output = x11_compositor_create_output(c, x, 0,
> -                                                     option_width ? width
> :
> +                                                     width ? width :
>                                                       o->width,
> -                                                     option_height ?
> height :
> +                                                     height ? height :
>                                                       o->height,
>                                                       fullscreen, no_input,
>                                                       o->name,
> o->transform);
> --
> 1.7.11.7
>
>

Sorry, please disregard this patch. I see now why I had to do it this way.
This patch would break the x11 backend if there are no configured outputs.


Thanks,

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20121104/e0fb7faf/attachment-0001.html>


More information about the wayland-devel mailing list