From 7c094420edb4892dc181f39bad0c4ec641444f9c Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 8 Jun 2020 14:11:52 +0200 Subject: [PATCH] transactions: propogate x/y of new box if needed --- river/Root.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/river/Root.zig b/river/Root.zig index f009d32..b034f39 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -158,11 +158,17 @@ fn startTransaction(self: *Self) void { }, .old_configure => { self.pending_configures += 1; - view.next_box = null; - std.debug.assert(view.pending_serial != null); + if (view.next_box) |next_box| { + view.pending_box.?.x = next_box.x; + view.pending_box.?.y = next_box.y; + view.next_box = null; + } }, .noop => { - view.next_box = null; + if (view.next_box) |next_box| { + view.pending_box = view.next_box; + view.next_box = null; + } std.debug.assert(view.pending_serial == null); }, }