summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2014-09-07 16:05:14 +0800
committerRichard Grenville <[email protected]>2014-09-07 16:05:14 +0800
commit882d38739957f4a8f1b2571880262082fa431e93 (patch)
tree5393a200ba5d9b19451114e6f65cb0e4c566b789
parent42448622a0c442789f949f4bedf5b3623655bb3b (diff)
downloadtdebase-882d38739957f4a8f1b2571880262082fa431e93.tar.gz
tdebase-882d38739957f4a8f1b2571880262082fa431e93.zip
Misc: Add --no-name-pixmap
Add --no-name-pixmap to disable the usage of XCompositeNameWindowPixmap(), for debugging.
-rw-r--r--common.h2
-rw-r--r--compton.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/common.h b/common.h
index 9c352acba..f9b5d9453 100644
--- a/common.h
+++ b/common.h
@@ -601,6 +601,8 @@ typedef struct _options_t {
Window benchmark_wid;
/// A list of conditions of windows not to paint.
c2_lptr_t *paint_blacklist;
+ /// Whether to avoid using XCompositeNameWindowPixmap(), for debugging.
+ bool no_name_pixmap;
/// Whether to work under synchronized mode for debugging.
bool synchronize;
/// Whether to show all X errors.
diff --git a/compton.c b/compton.c
index a29fd8724..330155891 100644
--- a/compton.c
+++ b/compton.c
@@ -5648,6 +5648,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
{ "glx-fshader-win", required_argument, NULL, 317 },
{ "version", no_argument, NULL, 318 },
{ "no-x-selection", no_argument, NULL, 319 },
+ { "no-name-pixmap", no_argument, NULL, 320 },
{ "reredir-on-root-change", no_argument, NULL, 731 },
{ "glx-reinit-on-root-change", no_argument, NULL, 732 },
// Must terminate with a NULL entry
@@ -5676,6 +5677,8 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
printf("%s\n", COMPTON_VERSION);
exit(0);
}
+ else if (320 == o)
+ ps->o.no_name_pixmap = true;
else if ('?' == o || ':' == o)
usage(1);
}
@@ -5731,6 +5734,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
case 'S':
case 314:
case 318:
+ case 320:
break;
P_CASELONG('D', fade_delta);
case 'I':
@@ -7090,7 +7094,8 @@ session_init(session_t *ps_old, int argc, char **argv) {
XCompositeQueryVersion(ps->dpy, &composite_major, &composite_minor);
- if (composite_major > 0 || composite_minor >= 2) {
+ if (!ps->o.no_name_pixmap
+ && (composite_major > 0 || composite_minor >= 2)) {
ps->has_name_pixmap = true;
}
}