mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Kill bar script on an unclean exit.
This commit is contained in:
parent
3e78a0cd60
commit
f9064bf49a
1 changed files with 10 additions and 0 deletions
10
spectrwm.c
10
spectrwm.c
|
@ -917,6 +917,7 @@ struct key *key_lookup(unsigned int, KeySym);
|
|||
void key_remove(struct key *);
|
||||
void key_replace(struct key *, unsigned int, KeySym, enum keyfuncid,
|
||||
const char *);
|
||||
void kill_bar_extra_atexit(void);
|
||||
void kill_refs(struct ws_win *);
|
||||
#ifdef SWM_DEBUG
|
||||
void leavenotify(xcb_leave_notify_event_t *);
|
||||
|
@ -2337,6 +2338,8 @@ bar_extra_setup(void)
|
|||
close(bar_pipe[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
atexit(kill_bar_extra_atexit);
|
||||
}
|
||||
|
||||
num_screens = xcb_setup_roots_length(xcb_get_setup(conn));
|
||||
|
@ -2354,6 +2357,13 @@ bar_extra_setup(void)
|
|||
xcb_flush(conn);
|
||||
}
|
||||
|
||||
void
|
||||
kill_bar_extra_atexit(void)
|
||||
{
|
||||
if (bar_pid)
|
||||
kill(bar_pid, SIGTERM);
|
||||
}
|
||||
|
||||
int
|
||||
isxlfd(char *s)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue