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

commitf75cb73350767fad464edc0dabd1d817e4a227b5
parent655147b904
authorIsaac Freund <[email protected]>
date2020-04-04 16:48
Add a bit of logging for transactions

 src/root.zig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/root.zig b/src/root.zig
index 14935b2..c88557d 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -258,6 +258,11 @@ pub const Root = struct {
             }
         }
 
+        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(
@@ -277,7 +282,8 @@ pub const Root = struct {
     fn handle_timeout(data: ?*c_void) callconv(.C) c_int {
         const root = @ptrCast(*Root, @alignCast(@alignOf(*Root), data));
 
-        // TODO: log warning
+        Log.Error.log("Transaction timed out. Some imperfect frames may be shown.", .{});
+
         root.commitTransaction();
 
         return 0;