From d3dd6e1752b2ed8748fe2e0d92f58ec7c353c8c0 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 16 Nov 2011 13:47:33 +0200 Subject: [PATCH] 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 --- compositor/shell.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compositor/shell.c b/compositor/shell.c index 200b5485..822c8c91 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); }