[PATCH] shell: don't remove all other panels on desktop panel redraw

Kristian Høgsberg hoegsberg at gmail.com
Thu Aug 9 07:54:20 PDT 2012


On Mon, Aug 06, 2012 at 07:06:01PM +0200, Philipp Brüschweiler wrote:
> panel_configure used to call configure_static_surface which removes all
> other surfaces in the panel layer. This unfortunately includes input
> panels, such as the one spawned by the keyboard client. As a result,
> the keyboard panel was removed on each redraw of the desktop panel, i.e.
> each full minute when the clock in the desktop panel changed.

Haha, yes, I just reproduced that, that's great.  I think we can just
introduce a new layer for input panels.  That way show_input_panels
becomes just inserting the layer in the layer_list, and hiding becomes
just removing the input panel layer.  We also get better control of
the stacking.

Kristian

> ---
>  src/shell.c | 11 ++++++++++-
>  1 Datei geändert, 10 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/src/shell.c b/src/shell.c
> index 35b19a1..3cd40c1 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -1918,8 +1918,17 @@ static void
>  panel_configure(struct weston_surface *es, int32_t sx, int32_t sy)
>  {
>  	struct desktop_shell *shell = es->private;
> +	struct weston_surface *s;
>  
> -	configure_static_surface(es, &shell->panel_layer);
> +	weston_surface_configure(es, es->output->x, es->output->y,
> +				 es->buffer->width, es->buffer->height);
> +
> +	wl_list_for_each(s, &shell->panel_layer.surface_list, layer_link)
> +		if (s == es)
> +			return;
> +
> +	wl_list_insert(&shell->panel_layer.surface_list, &es->layer_link);
> +	weston_compositor_schedule_repaint(es->compositor);
>  }
>  
>  static void
> -- 
> 1.7.11.4
> 
> _______________________________________________
> 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