[PATCH weston] compositor: Always set output_mask in weston_surface_update_output_mask().

Kristian Høgsberg hoegsberg at gmail.com
Fri Aug 3 17:11:17 PDT 2012


On Fri, Aug 03, 2012 at 05:11:51PM -0600, Scott Moreau wrote:
> ---

Yes, I saw that, but I was only testing with drm, and the black screen
didn't last too long there.  The problem is not that the masks are the
same, but that the fade surface doesn't have a client and thus doesn't
get an output mask.

> Commit 982387011 causes a bug where starting weston results in a black screen
> (if no clients are immediately started). The problem is that the offending
> commit causes the compositor to not damage if there is no difference in the
> output_mask, which is the case when the compositor first starts. This patch
> updates the surface output_mask unconditionally, whereas it stands currently,
> might not be set due to the cases where we return immediately.

This is a good explanation, exactly the type of description that
should go in a commit message.  So I edited the patch to include it,
though I changed it to describe the client == NULL case.

thanks,
Kristian

>  src/compositor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index faed8f2..a3273dc 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1349,12 +1349,12 @@ weston_surface_update_output_mask(struct weston_surface *es, uint32_t mask)
>  	struct wl_resource *resource = NULL;
>  	struct wl_client *client = es->surface.resource.client;
>  
> +	es->output_mask = mask;
>  	if (es->surface.resource.client == NULL)
>  		return;
>  	if (different == 0)
>  		return;
>  
> -	es->output_mask = mask;
>  	wl_list_for_each(output, &es->compositor->output_list, link) {
>  		if (1 << output->id & different)
>  			resource =
> -- 
> 1.7.11.2
> 
> _______________________________________________
> 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