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

Philipp Brüschweiler blei42 at gmail.com
Mon Aug 6 10:06:01 PDT 2012


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.
---
 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



More information about the wayland-devel mailing list