Add new views to the top of the stack

This commit is contained in:
Isaac Freund 2020-03-28 14:47:50 +01:00
parent 866f2c7614
commit 02910145c8
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ pub const Root = struct {
pub fn addView(self: *Self, wlr_xdg_surface: *c.wlr_xdg_surface) void {
const node = self.views.allocateNode(self.server.allocator) catch unreachable;
node.data.init(self, wlr_xdg_surface);
self.unmapped_views.append(node);
self.unmapped_views.prepend(node);
}
/// Finds the topmost view under the output layout coordinates lx, ly

View File

@ -109,7 +109,7 @@ pub const View = struct {
const node = @fieldParentPtr(std.TailQueue(View).Node, "data", view);
view.root.unmapped_views.remove(node);
view.root.views.append(node);
view.root.views.prepend(node);
view.root.arrange();
}