summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2014-04-19 19:41:26 +0800
committerRichard Grenville <pyxlcy@gmail.com>2014-04-19 19:41:26 +0800
commitb175464e8c88cc911dcc11198f247fa47c9586a5 (patch)
tree1cb7cae1fde07090a6bf05e7ac3f717c7894fd88 /common.h
parentdbba28f946bac1a73b31f326f41ff282994d8176 (diff)
downloadtdebase-b175464e8c88cc911dcc11198f247fa47c9586a5.tar.gz
tdebase-b175464e8c88cc911dcc11198f247fa47c9586a5.zip
Misc: Try to avoid evaluating conditions after window unmap & others
- Try to avoid evaluating conditions after window unmap/destruction. Unfortunately, frequently this doesn't work due to the asynchronous nature of X. - Add _GTK_FRAME_EXTENTS exclusion rules to compton.sample.conf. Thanks to memeplex, hexchain, and others for info. (#189) - Add debugging option --show-all-xerrors, and other debugging changes. Doc update.
Diffstat (limited to 'common.h')
-rw-r--r--common.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/common.h b/common.h
index 525b9a96b..5b6a266a6 100644
--- a/common.h
+++ b/common.h
@@ -14,6 +14,7 @@
// === Options ===
// Debug options, enable them using -D in CFLAGS
+// #define DEBUG_BACKTRACE 1
// #define DEBUG_REPAINT 1
// #define DEBUG_EVENTS 1
// #define DEBUG_RESTACK 1
@@ -72,6 +73,10 @@
#define COMPTON_VERSION "unknown"
#endif
+#if defined(DEBUG_ALLOC_REG)
+#define DEBUG_BACKTRACE 1
+#endif
+
// === Includes ===
// For some special functions
@@ -568,6 +573,8 @@ typedef struct _options_t {
c2_lptr_t *paint_blacklist;
/// Whether to work under synchronized mode for debugging.
bool synchronize;
+ /// Whether to show all X errors.
+ bool show_all_xerrors;
// === VSync & software optimization ===
/// User-specified refresh rate.
@@ -1192,13 +1199,13 @@ extern session_t *ps_g;
static inline void
print_timestamp(session_t *ps);
-#ifdef DEBUG_ALLOC_REG
+#ifdef DEBUG_BACKTRACE
#include <execinfo.h>
-#define BACKTRACE_SIZE 5
+#define BACKTRACE_SIZE 25
/**
- * Print current backtrace, excluding the first two items.
+ * Print current backtrace.
*
* Stolen from glibc manual.
*/
@@ -1211,12 +1218,14 @@ print_backtrace(void) {
size = backtrace(array, BACKTRACE_SIZE);
strings = backtrace_symbols(array, size);
- for (size_t i = 2; i < size; i++)
+ for (size_t i = 0; i < size; i++)
printf ("%s\n", strings[i]);
free(strings);
}
+#ifdef DEBUG_ALLOC_REG
+
/**
* Wrapper of <code>XFixesCreateRegion</code>, for debugging.
*/
@@ -1247,6 +1256,8 @@ XFixesDestroyRegion_(Display *dpy, XserverRegion reg,
#define XFixesDestroyRegion(dpy, reg) XFixesDestroyRegion_(dpy, reg, __func__, __LINE__)
#endif
+#endif
+
// === Functions ===
/**