App: remove id_shift and id_mask constants
[staging/windowmanager.git] / src / util.cpp
index db61bc2..c178d90 100644 (file)
 
 #include <unistd.h>
 
+#ifdef SCOPE_TRACING
 thread_local int ScopeTrace::indent = 0;
+ScopeTrace::ScopeTrace(char const *func) : f(func) {
+   fprintf(stderr, "%lu %*s%s -->\n", pthread_self(), 2 * indent++, "", this->f);
+}
+ScopeTrace::~ScopeTrace() { fprintf(stderr, "%lu %*s%s <--\n", pthread_self(), 2 * --indent, "", this->f); }
+#endif
 
 unique_fd::~unique_fd() {
    if (this->fd != -1) {