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

commit0953d695741b21269b7e6c4ff4d98a820f8c585c
parentf75cb73350
authorIsaac Freund <[email protected]>
date2020-04-04 16:48
Stop the transaction timer if timeout didn't occur

 src/root.zig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/root.zig b/src/root.zig
index c88557d..af1cff8 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -292,6 +292,10 @@ pub const Root = struct {
     pub fn notifyConfigured(self: *Self) void {
         self.pending_configures -= 1;
         if (self.pending_configures == 0) {
+            // Stop the timer, as we didn't timeout
+            if (c.wl_event_source_timer_update(self.transaction_timer, 0) == -1) {
+                // TODO: handle failure
+            }
             self.commitTransaction();
         }
     }