aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-09-28 16:28:47 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-09-28 16:28:47 +0200
commite019b9de47f8e0da679787cd7ca31c98b212d2a4 (patch)
treea145ebfe1cce75404aec2aa60e0f722fb1f55cb3
parentc95c0416d582dd5d119a15c1fdbb048c1e292e1d (diff)
downloadriver-e019b9de47f8e0da679787cd7ca31c98b212d2a4.tar.gz
river-e019b9de47f8e0da679787cd7ca31c98b212d2a4.tar.xz
view: always set fullscreen x/y to 0,0
This position is output relative not layout relative.
-rw-r--r--river/View.zig13
1 files changed, 9 insertions, 4 deletions
diff --git a/river/View.zig b/river/View.zig
index 5e77638..ddb0445 100644
--- a/river/View.zig
+++ b/river/View.zig
@@ -163,10 +163,15 @@ pub fn applyPending(self: *Self) void {
self.pending.box = self.float_box;
// If switching to fullscreen set the dimensions to the full area of the output
- if (!self.current.fullscreen and self.pending.fullscreen)
- self.pending.box = Box.fromWlrBox(
- c.wlr_output_layout_get_box(self.output.root.wlr_output_layout, self.output.wlr_output).*,
- );
+ if (!self.current.fullscreen and self.pending.fullscreen) {
+ const layout_box = c.wlr_output_layout_get_box(self.output.root.wlr_output_layout, self.output.wlr_output);
+ self.pending.box = .{
+ .x = 0,
+ .y = 0,
+ .width = @intCast(u32, layout_box.*.width),
+ .height = @intCast(u32, layout_box.*.height),
+ };
+ }
// If switching from fullscreen to layout, arrange the output to get
// assigned the proper size.