Stop the transaction timer if timeout didn't occur

This commit is contained in:
Isaac Freund 2020-04-04 16:48:59 +02:00
parent f17792183b
commit b30b9ba57e
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -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();
}
}