Do not send ipc_event_shutdown from ipc client

In `sway_terminate`, `ipc_event_shutdown` was being sent regardless
which mode sway was running in. When running as an ipc client,
`sway_terminate` should just exit
master
Brian Ashworth 6 years ago committed by emersion
parent f7309778a7
commit 686b853047

@ -31,10 +31,16 @@ static int exit_value = 0;
struct sway_server server = {0}; struct sway_server server = {0};
void sway_terminate(int exit_code) { void sway_terminate(int exit_code) {
terminate_request = true; if (!server.wl_display) {
exit_value = exit_code; // Running as IPC client
ipc_event_shutdown("exit"); exit(exit_code);
wl_display_terminate(server.wl_display); } else {
// Running as server
terminate_request = true;
exit_value = exit_code;
ipc_event_shutdown("exit");
wl_display_terminate(server.wl_display);
}
} }
void sig_handler(int signal) { void sig_handler(int signal) {

Loading…
Cancel
Save