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

commita46ca61cfbe492d616a5361a4d721c801d3dc689
parent3e7d290f48
authorIsaac Freund <[email protected]>
date2024-12-29 15:07
Window: reply to proposed_dimensions with dimensions

 river/Window.zig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/river/Window.zig b/river/Window.zig
index 950b458..b9622fa 100644
--- a/river/Window.zig
+++ b/river/Window.zig
@@ -660,6 +660,14 @@ pub fn configure(window: *Window) bool {
         .resizing = false, // XXX
     };
 
+    // Ensure a dimensions event is sent if the window manager has proposed dimensions
+    // even if the actual dimensions commited by the window do not change.
+    if (committed.proposed != null) {
+        window.sent.box.width = 0;
+        window.sent.box.height = 0;
+        committed.proposed = null;
+    }
+
     const track_configure = switch (window.impl) {
         .toplevel => |*toplevel| toplevel.configure(),
         .xwayland => |*xwindow| xwindow.configure(),