[PATCH] shell: restore correct layer in shell_unset_fullscreen

Kristian Høgsberg hoegsberg at gmail.com
Tue Oct 9 20:11:31 PDT 2012


On Sun, Oct 07, 2012 at 08:25:36PM +0200, Rafal Mielniczuk wrote:
> This fixes the bug where surface is above panel_layer
> just after it is restored from fullscreen mode.
> 
> How to reproduce:
> * move surface under panel
> * set surface fullscreen
> * restore surface to normal mode

Ah, yup, I see that.  Patch looks good, applied.

thanks,
Kristian

> ---
>  src/shell.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 1c44e39..c799409 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1421,6 +1421,7 @@ get_default_output(struct weston_compositor *compositor)
>  static void
>  shell_unset_fullscreen(struct shell_surface *shsurf)
>  {
> +	struct workspace *ws;
>  	/* undo all fullscreen things here */
>  	if (shsurf->fullscreen.type == WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER &&
>  	    shell_surface_is_top_fullscreen(shsurf)) {
> @@ -1442,6 +1443,10 @@ shell_unset_fullscreen(struct shell_surface *shsurf)
>          	               &shsurf->rotation.transform.link);
>  		shsurf->saved_rotation_valid = false;
>  	}
> +
> +	ws = get_current_workspace(shsurf->shell);
> +	wl_list_remove(&shsurf->surface->layer_link);
> +	wl_list_insert(&ws->layer.surface_list, &shsurf->surface->layer_link);
>  }
>  
>  static int
> -- 
> 1.7.12.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