From b175464e8c88cc911dcc11198f247fa47c9586a5 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Sat, 19 Apr 2014 19:41:26 +0800 Subject: 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. --- common.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'common.h') 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 -#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 XFixesCreateRegion, for debugging. */ @@ -1247,6 +1256,8 @@ XFixesDestroyRegion_(Display *dpy, XserverRegion reg, #define XFixesDestroyRegion(dpy, reg) XFixesDestroyRegion_(dpy, reg, __func__, __LINE__) #endif +#endif + // === Functions === /** -- cgit v1.2.1