[PATCH 05/10] desktop-shell: Allow fullscreen windows to mode-switch their output.

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 2 05:16:22 PDT 2015


On Sun, 21 Jun 2015 21:25:12 +0200
Mario Kleiner <mario.kleiner.de at gmail.com> wrote:

> Fix desktop-shell's activate() method to only restore the output
> mode on the single output on which a shell surface gets activated.
> 
> This way toplevel fullscreen surfaces can mode-switch their output
> via method WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER and that
> temporary mode properly persists until the surface loses its
> fullscreen status, but effects like window switching and exposay
> still work in the expected way.
> 
> v2: Split into a separate patch from original patch
>     "Allow restore_output_mode() to work properly.",
>     as suggested by Derek Foreman.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
> Cc: Derek Foreman <derekf at osg.samsung.com>
> ---
>  desktop-shell/shell.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 9bc86cf..64f0bd9 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -2971,6 +2971,7 @@ shell_configure_fullscreen(struct shell_surface *shsurf)
>  							 output->y - surf_y);
>  				break;
>  			} else {
> +				weston_log("shell: Can't switch to temporary mode.\n");
>  				restore_output_mode(output);
>  				center_on_output(shsurf->view, output);
>  			}
> @@ -5138,7 +5139,7 @@ activate(struct desktop_shell *shell, struct weston_surface *es,
>  	if (shsurf->state.fullscreen && configure)
>  		shell_configure_fullscreen(shsurf);
>  	else
> -		restore_all_output_modes(shell->compositor);
> +		restore_output_mode(shsurf->output);
>  
>  	/* Update the surface’s layer. This brings it to the top of the stacking
>  	 * order as appropriate. */

Looks good to me, pushed:
   ada4f07..492c12f  master -> master


Thanks,
pq


More information about the wayland-devel mailing list