summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2011-11-16 13:47:33 +0200
committerKristian Høgsberg <krh@bitplanet.net>2011-11-16 08:51:31 -0500
commitd3dd6e1752b2ed8748fe2e0d92f58ec7c353c8c0 (patch)
treedaff9ff73b41ab4aa23bbf535d57adacd5f950c8
parent1ec0c3159621afc473d0eb5d267f4d3cb844830e (diff)
shell: fix lock surface mapping
When the lock surface was map()'d while the compositor was locked, wlsc_surface_configure() was never called for the lock surface. Hence, the surface->output was NULL, and the 'frame' event was never sent, causing desktop-shell to loop in dri2_swap_buffers(). Fix this by calling wlsc_surface_configure() for the lock surface always in map(). Additionally, adjust the comments in map() to make it more readable. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
-rw-r--r--compositor/shell.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/compositor/shell.c b/compositor/shell.c
index 200b548..822c8c9 100644
--- a/compositor/shell.c
+++ b/compositor/shell.c
@@ -1069,17 +1069,23 @@ map(struct wlsc_shell *base,
else
list = &compositor->surface_list;
- /* Map background at the bottom of the stack, panel on top,
- everything else just below panel. */
+ /* surface stacking order, see also activate() */
if (surface == shell->background) {
+ /* background always visible, at the bottom */
wl_list_insert(compositor->surface_list.prev, &surface->link);
+
} else if (surface == shell->panel) {
+ /* panel always on top, hidden while locked */
wl_list_insert(list, &surface->link);
+
} else if (surface == shell->lock_surface) {
+ /* lock surface always visible, on top */
wl_list_insert(&compositor->surface_list, &surface->link);
+
wlsc_compositor_repick(compositor);
wlsc_compositor_wake(compositor);
} else {
+ /* everything else just below the panel */
wl_list_insert(&shell->panel->link, &surface->link);
}
@@ -1090,7 +1096,7 @@ map(struct wlsc_shell *base,
surface->width = width;
surface->height = height;
- if (!shell->locked)
+ if (!shell->locked || surface == shell->lock_surface)
wlsc_surface_configure(surface,
surface->x, surface->y, width, height);
}