[PATCH 2/7] shell: remove unused code from screensaver

Pekka Paalanen ppaalanen at gmail.com
Fri Feb 24 10:22:32 PST 2012


On Fri, 24 Feb 2012 18:08:40 +0200
Tiago Vignatti <tiago.vignatti at intel.com> wrote:

> The code being removed is actually never triggered due a race
> with the client that has just launched. However the client will
> issue an surface_attach to the compositor that will run the same
> routines inside map() later a bit.

Did you consider, that a screensaver client can be started manually
beforehand (the non-demo mode)?

In that case, the client is already connected and already created
the surfaces, and IIRC simply waits for frame events to animate.
This feature allows to temporarily override the compositor's choice
of a screensaver, and the compositor does not try to launch nor kill
the screensaver. Granted, it's not a very useful feature, but it's
there for now.


Thanks,
pq

> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
>  src/shell.c |   10 ----------
>  1 files changed, 0 insertions(+), 10 deletions(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index ee71dcc..689d735 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1290,7 +1290,6 @@ lock(struct weston_shell *base)
>  	struct weston_surface *cur;
>  	struct weston_surface *tmp;
>  	struct weston_input_device *device;
> -	struct shell_surface *shsurf;
>  	uint32_t time;
>  
>  	if (shell->locked)
> @@ -1323,15 +1322,6 @@ lock(struct weston_shell *base)
>  
>  	launch_screensaver(shell);
>  
> -	wl_list_for_each(shsurf, &shell->screensaver.surfaces,
> link)
> -		show_screensaver(shell, shsurf);
> -
> -	if (!wl_list_empty(&shell->screensaver.surfaces)) {
> -		shell->compositor->idle_time =
> shell->screensaver.duration;
> -		weston_compositor_wake(shell->compositor);
> -		shell->compositor->state =
> WESTON_COMPOSITOR_IDLE;
> -	}
> -
>  	/* reset pointer foci */
>  	weston_compositor_repick(shell->compositor);
>  
> -- 
> 1.7.5.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


-- 
Pekka Paalanen
http://www.iki.fi/pq/


More information about the wayland-devel mailing list