seat: always add view to focus stack on map

Currently if a view is mapped while some other view is fullscreen, it
will not be added to the focus stack, which means that if the fullscreen
view is then closed the view which was not added to the focus stack will
not be focused.

To fix this, always add views to the focus stack on map.
This commit is contained in:
Isaac Freund
2021-08-10 21:54:36 +02:00
parent e752555969
commit 1baf3bf462
5 changed files with 31 additions and 41 deletions

View File

@ -207,7 +207,10 @@ fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface: *wl
}
}
view.map();
view.map() catch {
std.log.crit("out of memory", .{});
surface.resource.getClient().postNoMemory();
};
}
/// Called when the surface is unmapped and will no longer be displayed.