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.
This commit is contained in:
19
src/common.h
19
src/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 ===
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user