aboutsummaryrefslogtreecommitdiff
path: root/src/root.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-17 19:37:50 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-17 19:37:50 +0200
commited7aca261bc51790334a0adc9e00df5eda6dbc83 (patch)
tree29416a14d4cc64a20b60aac2c4923ea8228e8cbd /src/root.zig
parent0557d9df9d0269140f4ae40335720cd74208df9f (diff)
downloadriver-ed7aca261bc51790334a0adc9e00df5eda6dbc83.tar.gz
river-ed7aca261bc51790334a0adc9e00df5eda6dbc83.tar.xz
Only log transactions if actually started
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/root.zig b/src/root.zig
index 8a101fa..eb7b0f3 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -141,18 +141,19 @@ pub const Root = struct {
}
}
- Log.Debug.log(
- "Started transaction with {} pending configures.",
- .{self.pending_configures},
- );
-
if (self.pending_configures > 0) {
+ Log.Debug.log(
+ "Started transaction with {} pending configures.",
+ .{self.pending_configures},
+ );
+
// TODO: log failure to create timer and commit immediately
self.transaction_timer = c.wl_event_loop_add_timer(
self.server.wl_event_loop,
handle_timeout,
self,
);
+
// Set timeout to 200ms
if (c.wl_event_source_timer_update(self.transaction_timer, 200) == -1) {
// TODO: handle failure