diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-02 13:44:24 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-02 13:44:24 +0200 |
| commit | 57f27f7cc6a232827a774c3f36035d9290f3b6ce (patch) | |
| tree | 4d2fd98b9a989888c77016550c66470dd6679069 /src/output.zig | |
| parent | 26a5aaca69fecbf818d247fc7d838d7482431f20 (diff) | |
| download | river-57f27f7cc6a232827a774c3f36035d9290f3b6ce.tar.gz river-57f27f7cc6a232827a774c3f36035d9290f3b6ce.tar.xz | |
Implement tag assignment
There are a few bugs with this, but the core logic is sound
Diffstat (limited to 'src/output.zig')
| -rw-r--r-- | src/output.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output.zig b/src/output.zig index 147e890..d3b3ffe 100644 --- a/src/output.zig +++ b/src/output.zig @@ -86,7 +86,7 @@ pub const Output = struct { const view = &node.data; // Only render currently visible views - if (!view.isVisible(output.root.current_focused_tags)) { + if (view.current_tags & output.root.current_focused_tags == 0) { continue; } @@ -118,10 +118,10 @@ pub const Output = struct { // and need to render that buffer until the transaction is complete. if (view.stashed_buffer) |buffer| { var box = c.wlr_box{ - .x = view.current_state.x, - .y = view.current_state.y, - .width = @intCast(c_int, view.current_state.width), - .height = @intCast(c_int, view.current_state.height), + .x = view.current_box.x, + .y = view.current_box.y, + .width = @intCast(c_int, view.current_box.width), + .height = @intCast(c_int, view.current_box.height), }; // Scale the box to the output's current scaling factor @@ -185,8 +185,8 @@ pub const Output = struct { var ox: f64 = 0.0; var oy: f64 = 0.0; c.wlr_output_layout_output_coords(view.root.wlr_output_layout, output, &ox, &oy); - ox += @intToFloat(f64, view.current_state.x + sx); - oy += @intToFloat(f64, view.current_state.y + sy); + ox += @intToFloat(f64, view.current_box.x + sx); + oy += @intToFloat(f64, view.current_box.y + sy); var box = c.wlr_box{ .x = @floatToInt(c_int, ox), |
