[PATCH] compositor: remove destroyed surfaces from layer lists even if unmapped

Ander Conselvan de Oliveira conselvan2 at gmail.com
Mon Aug 6 01:51:47 PDT 2012


On 08/04/2012 04:59 PM, Philipp Brüschweiler wrote:
> This bug can be observed in action using the following steps:
> * ./editor
> * (in another terminal) ./keyboard
> * click into a field of the editor (the keyboard appears)
> * click outside of a field of the editor (keybord disappears)
> * kill the keyboard (ctrl-c)
> * click into a field of the editor again
> ---
>   src/compositor.c | 2 ++
>   1 Datei geändert, 2 Zeilen hinzugefügt(+)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index a3273dc..b1560e9 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -693,6 +693,8 @@ destroy_surface(struct wl_resource *resource)
>
>   	if (weston_surface_is_mapped(surface))
>   		weston_surface_unmap(surface);
> +	else if (surface->layer_link.next)
> +		wl_list_remove(&surface->layer_link);

If a surface is not mapped it should not be in any layer. The real 
problem here is that the input panel code abuses layer_link to insert 
the panel surfaces into another list. See show/hide_input_panels() in 
shell.c.

Cheers,
Ander


More information about the wayland-devel mailing list