From 69a05d516bd0c7e369a0ba1fb78aac57a5ea26f2 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 12 Mar 2020 12:30:51 +0100 Subject: Initial commit for the last i3lock commit at this time f3b061233e28ad0cf920c9421adc2459b6920812 --- i3lock.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 i3lock.h (limited to 'i3lock.h') diff --git a/i3lock.h b/i3lock.h new file mode 100644 index 0000000..57190e5 --- /dev/null +++ b/i3lock.h @@ -0,0 +1,14 @@ +#ifndef _I3LOCK_H +#define _I3LOCK_H + +/* This macro will only print debug output when started with --debug. + * 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__); \ + } while (0) + +#endif -- cgit v1.3