only LOG() the DPI when it changes, DLOG() it otherwise (Thanks lkraav)

This avoids flooding stdout every time some text (e.g. a window
decoration) is drawn, yet leaves the message in place when it’s actually
relevant (upon DPI changes).

fixes #1115
This commit is contained in:
Michael Stapelberg
2013-12-24 10:35:56 +01:00
parent 28939365cb
commit 0883dfbe14
8 changed files with 41 additions and 7 deletions

View File

@ -48,6 +48,9 @@
} \
} while (0)
#if defined(DLOG)
#undef DLOG
#endif
/* Use cool logging-macros */
#define DLOG(fmt, ...) do { \
if (config.verbose) { \

View File

@ -18,7 +18,7 @@
#include "common.h"
/*
* Having verboselog() and errorlog() is necessary when using libi3.
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
*
*/
void verboselog(char *fmt, ...) {
@ -37,6 +37,9 @@ void errorlog(char *fmt, ...) {
va_end(args);
}
void debuglog(char *fmt, ...) {
}
/*
* Glob path, i.e. expand ~
*