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

commitde66e480187b05e80825e69f0c0fcd74fc14ce61
parent73fa4234b7
authorIsaac Freund <[email protected]>
date2026-04-17 09:26
XdgToplevel: fix initial configure with 0 dimension

Currently we fail to track configures with a 0 dimension if they are the
first configure sent for the window since we compare to the
zero-initialized geometry.

This results in river sending render_start too soon without giving the
client time to ack_configure and commit.

 river/XdgToplevel.zig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/river/XdgToplevel.zig b/river/XdgToplevel.zig
index 2971062..8288ec2 100644
--- a/river/XdgToplevel.zig
+++ b/river/XdgToplevel.zig
@@ -189,7 +189,8 @@ pub fn configure(toplevel: *XdgToplevel) bool {
     // change in size involved. If the configure state is not idle, we are
     // currently tracking a timed out configure and should instead track the
     // new one even if there is no change in size involved.
-    if (width == toplevel.geometry.width and height == toplevel.geometry.height and
+    if (width != 0 and height != 0 and
+        width == toplevel.geometry.width and height == toplevel.geometry.height and
         toplevel.configure_state == .idle)
     {
         return false;