Kill left-over i3-nagbar processes on 'exit'
This commit is contained in:
12
src/main.c
12
src/main.c
@ -163,6 +163,14 @@ static void xkb_got_event(EV_P_ struct ev_io *w, int revents) {
|
||||
DLOG("Done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Exit handler which destroys the main_loop. Will trigger cleanup handlers.
|
||||
*
|
||||
*/
|
||||
static void i3_exit() {
|
||||
ev_loop_destroy(main_loop);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
//parse_cmd("[ foo ] attach, attach ; focus");
|
||||
int screens;
|
||||
@ -529,5 +537,9 @@ int main(int argc, char *argv[]) {
|
||||
start_application(exec_always->command);
|
||||
}
|
||||
|
||||
/* Make sure to destroy the event loop to invoke the cleeanup callbacks
|
||||
* when calling exit() */
|
||||
atexit(i3_exit);
|
||||
|
||||
ev_loop(main_loop, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user