Add -b option to fork to background.
This commit is contained in:
parent
92eb57ff44
commit
d226a9d988
|
@ -56,6 +56,13 @@ drag-and-drop windows.
|
||||||
When \-f is specified, also enables the fade effect when windows change their
|
When \-f is specified, also enables the fade effect when windows change their
|
||||||
opacity, as with transset(1).
|
opacity, as with transset(1).
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-b
|
||||||
|
Attempts to fork to background after registered composition
|
||||||
|
manager. Still sits in foreground if fork failed. Maybe useful
|
||||||
|
if you computer is too fast, in which case some programs
|
||||||
|
requiring a composite manager may have started before composite
|
||||||
|
manager is ready.
|
||||||
|
.TP
|
||||||
.BI \-i\ opacity
|
.BI \-i\ opacity
|
||||||
Specifies inactive window transparency. (0.1 - 1.0)
|
Specifies inactive window transparency. (0.1 - 1.0)
|
||||||
.TP
|
.TP
|
||||||
|
|
13
compton.c
13
compton.c
|
@ -2423,6 +2423,7 @@ main(int argc, char **argv) {
|
||||||
int o;
|
int o;
|
||||||
Bool no_dock_shadow = False;
|
Bool no_dock_shadow = False;
|
||||||
Bool no_dnd_shadow = False;
|
Bool no_dnd_shadow = False;
|
||||||
|
Bool fork_after_register = False;
|
||||||
|
|
||||||
for (i = 0; i < NUM_WINTYPES; ++i) {
|
for (i = 0; i < NUM_WINTYPES; ++i) {
|
||||||
win_type_fade[i] = False;
|
win_type_fade[i] = False;
|
||||||
|
@ -2430,7 +2431,7 @@ main(int argc, char **argv) {
|
||||||
win_type_opacity[i] = 1.0;
|
win_type_opacity[i] = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((o = getopt(argc, argv, "D:I:O:d:r:o:m:l:t:i:e:scnfFCaSzG")) != -1) {
|
while ((o = getopt(argc, argv, "D:I:O:d:r:o:m:l:t:i:e:scnfFCaSzGb")) != -1) {
|
||||||
switch (o) {
|
switch (o) {
|
||||||
case 'd':
|
case 'd':
|
||||||
display = optarg;
|
display = optarg;
|
||||||
|
@ -2507,6 +2508,9 @@ main(int argc, char **argv) {
|
||||||
case 'G':
|
case 'G':
|
||||||
no_dnd_shadow = True;
|
no_dnd_shadow = True;
|
||||||
break;
|
break;
|
||||||
|
case 'b':
|
||||||
|
fork_after_register = True;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
break;
|
break;
|
||||||
|
@ -2564,6 +2568,13 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
register_cm(scr);
|
register_cm(scr);
|
||||||
|
if (fork_after_register) {
|
||||||
|
int pid = fork();
|
||||||
|
if (pid < 0)
|
||||||
|
fprintf(stderr, "Fork failed\n");
|
||||||
|
else if (pid > 0)
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
get_atoms();
|
get_atoms();
|
||||||
|
|
||||||
pa.subwindow_mode = IncludeInferiors;
|
pa.subwindow_mode = IncludeInferiors;
|
||||||
|
|
Loading…
Reference in New Issue