Only log transactions if actually started

This commit is contained in:
Isaac Freund 2020-04-17 19:37:50 +02:00
parent 0557d9df9d
commit ed7aca261b
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -141,18 +141,19 @@ pub const Root = struct {
}
}
if (self.pending_configures > 0) {
Log.Debug.log(
"Started transaction with {} pending configures.",
.{self.pending_configures},
);
if (self.pending_configures > 0) {
// 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