diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-03 18:53:36 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-04 16:51:02 +0200 |
| commit | 6cb9f6ac04e1fc7716bd69707c714ae89599cccc (patch) | |
| tree | d2b2e846a5f191b25e1853a0d60e5776f05b57c6 /src/server.zig | |
| parent | 9ba295f12673f201b5d70fa3918e270ef41be9f7 (diff) | |
| download | river-6cb9f6ac04e1fc7716bd69707c714ae89599cccc.tar.gz river-6cb9f6ac04e1fc7716bd69707c714ae89599cccc.tar.xz | |
Add a data structure to manage the view stack
Diffstat (limited to 'src/server.zig')
| -rw-r--r-- | src/server.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server.zig b/src/server.zig index 3b6a9bc..0c8d4df 100644 --- a/src/server.zig +++ b/src/server.zig @@ -7,6 +7,7 @@ const Output = @import("output.zig").Output; const Root = @import("root.zig").Root; const Seat = @import("seat.zig").Seat; const View = @import("view.zig").View; +const ViewStack = @import("view_stack.zig").ViewStack; pub const Server = struct { const Self = @This(); @@ -193,10 +194,10 @@ pub const Server = struct { }, c.XKB_KEY_Return => { if (self.root.focused_view) |current_focus| { - const node = @fieldParentPtr(std.TailQueue(View).Node, "data", current_focus); + const node = @fieldParentPtr(ViewStack.Node, "view", current_focus); if (node != self.root.views.first) { self.root.views.remove(node); - self.root.views.prepend(node); + self.root.views.push(node); self.root.arrange(); } } |
