From b3f7f5436a2b3e67bfeb1d36cb62c188b83cf792 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 Apr 2019 04:11:29 +0200 Subject: [PATCH] Snake+Minesweeper: Exit process when game window is closed. --- Games/Minesweeper/main.cpp | 1 + Games/Snake/main.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Games/Minesweeper/main.cpp b/Games/Minesweeper/main.cpp index 2c4ae20e3a..d1771b70ad 100644 --- a/Games/Minesweeper/main.cpp +++ b/Games/Minesweeper/main.cpp @@ -13,6 +13,7 @@ int main(int argc, char** argv) GApplication app(argc, argv); auto* window = new GWindow; + window->set_should_exit_event_loop_on_close(true); window->set_resizable(false); window->set_title("Minesweeper"); window->set_rect(100, 100, 139, 175); diff --git a/Games/Snake/main.cpp b/Games/Snake/main.cpp index 59ffc6b413..34dee293b7 100644 --- a/Games/Snake/main.cpp +++ b/Games/Snake/main.cpp @@ -12,6 +12,7 @@ int main(int argc, char** argv) GApplication app(argc, argv); auto* window = new GWindow; + window->set_should_exit_event_loop_on_close(true); window->set_double_buffering_enabled(false); window->set_title("Snake"); window->set_rect(100, 100, 320, 320);