diff --git a/src/anbox/ubuntu/window_creator.cpp b/src/anbox/ubuntu/window_creator.cpp index ec442c0dcf3ee697011d5626ff8b0760a920ea62..7ba0c2c71c918f34549a6d3029695592a8539f91 100644 --- a/src/anbox/ubuntu/window_creator.cpp +++ b/src/anbox/ubuntu/window_creator.cpp @@ -21,6 +21,9 @@ #include +#include +#include + namespace anbox { namespace ubuntu { WindowCreator::WindowCreator(const std::shared_ptr &input_manager) : @@ -50,9 +53,10 @@ void WindowCreator::process_events() { while (SDL_WaitEventTimeout(&event, 100)) { switch (event.type) { case SDL_QUIT: - // FIXME: We exit here only as long as we don't have multi window - // support. - BOOST_THROW_EXCEPTION(std::runtime_error("User closed main application window")); + // This is the best way to reliable terminate the whole application for now. It will + // trigger a correct shutdown in the main part. + ::kill(getpid(), SIGTERM); + break; case SDL_WINDOWEVENT: process_window_event(event); break;