From b822084f39b568d7a1b65b0df7e77ec1dbb3c0bb Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 13 Apr 2020 17:25:39 +0200 Subject: Allow storing *View in ViewStack This is done in preparation for implementing focus stacks. --- src/command.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/command.zig') diff --git a/src/command.zig b/src/command.zig index 1f2b483..b5c237a 100644 --- a/src/command.zig +++ b/src/command.zig @@ -3,6 +3,7 @@ const c = @import("c.zig"); const Log = @import("log.zig").Log; const Server = @import("server.zig").Server; +const View = @import("view.zig").View; const ViewStack = @import("view_stack.zig").ViewStack; pub const Arg = union { @@ -60,7 +61,7 @@ pub fn modifyMasterFactor(server: *Server, arg: Arg) void { pub fn zoom(server: *Server, arg: Arg) void { if (server.root.focused_view) |current_focus| { const output = server.root.focusedOutput(); - const node = @fieldParentPtr(ViewStack.Node, "view", current_focus); + const node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus); if (node != output.views.first) { output.views.remove(node); output.views.push(node); -- cgit v1.2.3