Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Describe HUP
[spectrwm.git]
/
scrotwm.c
diff --git
a/scrotwm.c
b/scrotwm.c
index
a8a4f31
..
67ad17a
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-168,6
+168,7
@@
Atom aprot;
Atom adelete;
Atom takefocus;
volatile sig_atomic_t running = 1;
Atom adelete;
Atom takefocus;
volatile sig_atomic_t running = 1;
+volatile sig_atomic_t restart_wm = 0;
int outputs = 0;
int last_focus_event = FocusOut;
int (*xerrorxlib)(Display *, XErrorEvent *);
int outputs = 0;
int last_focus_event = FocusOut;
int (*xerrorxlib)(Display *, XErrorEvent *);
@@
-608,9
+609,11
@@
sighdlr(int sig)
break;
}
break;
break;
}
break;
+ case SIGHUP:
+ restart_wm = 1;
+ break;
case SIGINT:
case SIGTERM:
case SIGINT:
case SIGTERM:
- case SIGHUP:
case SIGQUIT:
running = 0;
break;
case SIGQUIT:
running = 0;
break;
@@
-4924,6
+4927,8
@@
main(int argc, char *argv[])
if (select(xfd + 1, &rd, NULL, NULL, &tv) == -1)
if (errno != EINTR)
DNPRINTF(SWM_D_MISC, "select failed");
if (select(xfd + 1, &rd, NULL, NULL, &tv) == -1)
if (errno != EINTR)
DNPRINTF(SWM_D_MISC, "select failed");
+ if (restart_wm == 1)
+ restart(NULL, NULL);
if (running == 0)
goto done;
if (bar_alarm) {
if (running == 0)
goto done;
if (bar_alarm) {