diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-08 20:13:02 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-08 20:13:02 +0200 |
| commit | 85f38c06d094ba77ac7215331005fefe1c9c4e01 (patch) | |
| tree | 43a992a980eb7a052c332321853dd4c6f8b98878 /src/command/zoom.zig | |
| parent | 14ffe91a52f4e5a6a706f02882bf19999b6a6739 (diff) | |
| download | river-85f38c06d094ba77ac7215331005fefe1c9c4e01.tar.gz river-85f38c06d094ba77ac7215331005fefe1c9c4e01.tar.xz | |
Fix broken crashy behavior of zoom
Diffstat (limited to 'src/command/zoom.zig')
| -rw-r--r-- | src/command/zoom.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command/zoom.zig b/src/command/zoom.zig index 5a5ca93..b1f7ba6 100644 --- a/src/command/zoom.zig +++ b/src/command/zoom.zig @@ -29,8 +29,9 @@ pub fn zoom(seat: *Seat, arg: Arg) void { const output = seat.focused_output; const focused_node = @fieldParentPtr(ViewStack(View).Node, "view", current_focus); - const zoom_node = if (focused_node == output.views.first) - if (focused_node.next) |second| second else null + var it = ViewStack(View).iterator(output.views.first, output.current_focused_tags); + const zoom_node = if (focused_node == it.next()) + if (it.next()) |second| second else null else focused_node; |
