git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitcebc21276f78cf8e9faea36b705403ff668c7dde
parentefbbed2c10
authorIsaac Freund <[email protected]>
date2021-09-30 17:17
View: resize if moved between outputs while fullscreen

 river/View.zig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/river/View.zig b/river/View.zig
index af380d3..4d435fd 100644
--- a/river/View.zig
+++ b/river/View.zig
@@ -303,6 +303,13 @@ pub fn sendToOutput(self: *Self, destination_output: *Output) void {
         self.foreign_toplevel_handle.?.outputEnter(destination_output.wlr_output);
     }
 
+    const dimensions = destination_output.getEffectiveResolution();
+    self.pending.box = .{
+        .x = 0,
+        .y = 0,
+        .width = dimensions.width,
+        .height = dimensions.height,
+    };
     self.output = destination_output;
 }