View: handle map while no outputs are available

Currently views which are mapped while no outputs are available can
never actually get rendered because they have 0 tags and are stuck in
the hidden stack.

This commit fixes this and they should now be restored when a new output
becomes available.
This commit is contained in:
Isaac Freund
2023-11-09 16:36:39 +01:00
parent 927dceb071
commit 69b61602cf
2 changed files with 46 additions and 20 deletions

View File

@ -362,6 +362,9 @@ pub fn activateOutput(root: *Self, output: *Output) void {
// If we previously had no outputs, move all views to the new output and focus it.
if (first) {
const log = std.log.scoped(.output_manager);
log.debug("moving views from fallback stacks to new output", .{});
output.pending.tags = root.fallback.tags;
{
var it = root.fallback.pending.focus_stack.safeIterator(.reverse);