Gracefully stop applications on server quit

This doesn't work with Ctrl+C as the entire process group is signaled,
but it works with wivrnctl stop-server.
This commit is contained in:
Sapphire
2026-08-24 14:13:07 -05:00
parent e604848409
commit c564436377
3 changed files with 59 additions and 30 deletions
+4 -1
View File
@@ -132,7 +132,7 @@ public:
void start(ipc_server *);
void stop();
bool request_stop();
void request_stop();
void quit_if_no_client();
clock_offset get_offset();
@@ -221,6 +221,9 @@ private:
void pause_session();
void resume_session();
// nullopt for id stops all apps
void stop_application(std::optional<uint32_t> id, int64_t timeout_ns);
void update_client_states(bool visible, bool focused);
void poll_session_loss();