mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Just quit when the connection is closed
This commit is contained in:
parent
a090902140
commit
986825a118
3 changed files with 5 additions and 9 deletions
11
bspwm.c
11
bspwm.c
|
@ -176,8 +176,10 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (xcb_connection_has_error(dpy))
|
||||
err("The server has closed the connection.\n");
|
||||
if (xcb_connection_has_error(dpy)) {
|
||||
warn("The server closed the connection.\n");
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup();
|
||||
|
@ -314,11 +316,6 @@ void register_events(void)
|
|||
}
|
||||
}
|
||||
|
||||
void quit(void)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
void cleanup(void)
|
||||
{
|
||||
while (mon_head != NULL)
|
||||
|
|
1
bspwm.h
1
bspwm.h
|
@ -76,7 +76,6 @@ bool randr;
|
|||
void init(void);
|
||||
void setup(void);
|
||||
void register_events(void);
|
||||
void quit(void);
|
||||
void cleanup(void);
|
||||
void put_status(void);
|
||||
void sig_handler(int sig);
|
||||
|
|
|
@ -844,7 +844,7 @@ bool cmd_quit(char **args, int num)
|
|||
{
|
||||
if (num > 0 && sscanf(*args, "%i", &exit_status) != 1)
|
||||
return false;
|
||||
quit();
|
||||
running = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue