summaryrefslogtreecommitdiffstats
path: root/compton.c
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2014-07-13 09:34:38 +0800
committerRichard Grenville <pyxlcy@gmail.com>2014-07-13 09:34:38 +0800
commit90c3a42d5539e12c26684ad43fdda2209ecd39fe (patch)
tree80cc178d5db116da2d118213a875dab507f9b8bb /compton.c
parent1df3c8650b559daa7035f643f2db236b81abc662 (diff)
downloadtdebase-90c3a42d5539e12c26684ad43fdda2209ecd39fe.tar.gz
tdebase-90c3a42d5539e12c26684ad43fdda2209ecd39fe.zip
Misc: Add --version & --no-x-selection
- Add --version. (#206) - Add --no-x-selection for debugging. (#207)
Diffstat (limited to 'compton.c')
-rw-r--r--compton.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/compton.c b/compton.c
index 973261c46..fb1d0b5cd 100644
--- a/compton.c
+++ b/compton.c
@@ -4759,7 +4759,8 @@ register_cm(session_t *ps) {
printf_errf("(): Failed to set COMPTON_VERSION.");
}
- {
+ // Acquire X Selection _NET_WM_CM_S?
+ if (!ps->o.no_x_selection) {
unsigned len = strlen(REGISTER_PROP) + 2;
int s = ps->scr;
@@ -5614,6 +5615,8 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
{ "no-fading-destroyed-argb", no_argument, NULL, 315 },
{ "force-win-blend", no_argument, NULL, 316 },
{ "glx-fshader-win", required_argument, NULL, 317 },
+ { "version", no_argument, NULL, 318 },
+ { "no-x-selection", no_argument, NULL, 319 },
// Must terminate with a NULL entry
{ NULL, 0, NULL, 0 },
};
@@ -5636,6 +5639,10 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
ps->o.synchronize = true;
else if (314 == o)
ps->o.show_all_xerrors = true;
+ else if (318 == o) {
+ printf("%s\n", COMPTON_VERSION);
+ exit(0);
+ }
else if ('?' == o || ':' == o)
usage(1);
}
@@ -5690,6 +5697,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
case 'd':
case 'S':
case 314:
+ case 318:
break;
P_CASELONG('D', fade_delta);
case 'I':
@@ -5874,6 +5882,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
case 317:
ps->o.glx_fshader_win_str = mstrcpy(optarg);
break;
+ P_CASEBOOL(319, no_x_selection);
default:
usage(1);
break;