[PATCH weston v4 1/4] shell: Use relative layers for lock/unlock

Pekka Paalanen ppaalanen at gmail.com
Sun May 12 23:26:57 PDT 2013


On Sun, 12 May 2013 11:09:32 +0200
Quentin Glidic <sardemff7+wayland at sardemff7.net> wrote:

> From: Quentin Glidic <sardemff7+git at sardemff7.net>

The commit message here should state why this change is needed, and
what it does on a high level. I can guess, but I'd like it written out
also for posterity.


Thanks,
pq


> 
> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> ---
>  src/shell.c | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 135eaa5..456e911 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -2501,19 +2501,16 @@ resume_desktop(struct desktop_shell *shell)
>  
>  	terminate_screensaver(shell);
>  
> -	wl_list_remove(&shell->lock_layer.link);
> -	wl_list_insert(&shell->compositor->cursor_layer.link,
> +	wl_list_insert(&shell->lock_layer.link,
>  		       &shell->fullscreen_layer.link);
> +	wl_list_remove(&shell->lock_layer.link);
>  	wl_list_insert(&shell->fullscreen_layer.link,
>  		       &shell->panel_layer.link);
> -	if (shell->showing_input_panels) {
> +	wl_list_insert(&shell->panel_layer.link,
> +		       &ws->layer.link);
> +	if (shell->showing_input_panels)
>  		wl_list_insert(&shell->panel_layer.link,
>  			       &shell->input_panel_layer.link);
> -		wl_list_insert(&shell->input_panel_layer.link,
> -			       &ws->layer.link);
> -	} else {
> -		wl_list_insert(&shell->panel_layer.link, &ws->layer.link);
> -	}
>  
>  	restore_focus_state(shell, get_current_workspace(shell));
>  
> @@ -2983,12 +2980,12 @@ lock(struct desktop_shell *shell)
>  	 * input events while we are locked. */
>  
>  	wl_list_remove(&shell->panel_layer.link);
> -	wl_list_remove(&shell->fullscreen_layer.link);
>  	if (shell->showing_input_panels)
>  		wl_list_remove(&shell->input_panel_layer.link);
>  	wl_list_remove(&ws->layer.link);
> -	wl_list_insert(&shell->compositor->cursor_layer.link,
> +	wl_list_insert(&shell->fullscreen_layer.link,
>  		       &shell->lock_layer.link);
> +	wl_list_remove(&shell->fullscreen_layer.link);
>  
>  	launch_screensaver(shell);
>  



More information about the wayland-devel mailing list