i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit cd7172d41585986569cc8b1974cf583633edd45e
parent f3b061233e28ad0cf920c9421adc2459b6920812
Author: Michael Stapelberg <stapelberg@users.noreply.github.com>
Date:   Sun,  5 Jul 2020 09:24:18 +0200

make --debug output go to stderr (#279)


Diffstat:
Mi3lock.h | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/i3lock.h b/i3lock.h
@@ -5,10 +5,11 @@
  * This is important because xautolock (for example) closes stdout/stderr by
  * default, so just printing something to stdout will lead to the data ending
  * up on the X11 socket (!). */
-#define DEBUG(fmt, ...)                                   \
-    do {                                                  \
-        if (debug_mode)                                   \
-            printf("[i3lock-debug] " fmt, ##__VA_ARGS__); \
+#define DEBUG(fmt, ...)                                            \
+    do {                                                           \
+        if (debug_mode) {                                          \
+            fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \
+        }                                                          \
     } while (0)
 
 #endif