diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-13 17:25:39 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-13 17:25:39 +0200 |
| commit | b822084f39b568d7a1b65b0df7e77ec1dbb3c0bb (patch) | |
| tree | 179bf89821017a35d013822d097eeef0b07cb53e /src/render.zig | |
| parent | 0f52f664f22c81e3971cfbf62d0f2f6da90c98f1 (diff) | |
| download | river-b822084f39b568d7a1b65b0df7e77ec1dbb3c0bb.tar.gz river-b822084f39b568d7a1b65b0df7e77ec1dbb3c0bb.tar.xz | |
Allow storing *View in ViewStack
This is done in preparation for implementing focus stacks.
Diffstat (limited to 'src/render.zig')
| -rw-r--r-- | src/render.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render.zig b/src/render.zig index a330a5b..074228c 100644 --- a/src/render.zig +++ b/src/render.zig @@ -44,8 +44,9 @@ pub fn renderOutput(output: *Output) void { renderLayer(output.*, output.layers[c.ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM], &now, ox, oy); // The first view in the list is "on top" so iterate in reverse. - var it = ViewStack.reverseIterator(output.views.last, output.current_focused_tags); - while (it.next()) |view| { + var it = ViewStack(View).reverseIterator(output.views.last, output.current_focused_tags); + while (it.next()) |node| { + const view = &node.view; // This check prevents a race condition when a frame is requested // between mapping of a view and the first configure being handled. if (view.current_box.width == 0 or view.current_box.height == 0) { |
