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>
This commit is contained in:
parent
1ec0c31596
commit
d3dd6e1752
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user