Snake+Minesweeper: Exit process when game window is closed.

This commit is contained in:
Andreas Kling 2019-04-21 04:11:29 +02:00
parent 57da00b731
commit b3f7f5436a
Notes: sideshowbarker 2024-07-19 14:37:43 +09:00
2 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv); GApplication app(argc, argv);
auto* window = new GWindow; auto* window = new GWindow;
window->set_should_exit_event_loop_on_close(true);
window->set_resizable(false); window->set_resizable(false);
window->set_title("Minesweeper"); window->set_title("Minesweeper");
window->set_rect(100, 100, 139, 175); window->set_rect(100, 100, 139, 175);

View File

@ -12,6 +12,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv); GApplication app(argc, argv);
auto* window = new GWindow; auto* window = new GWindow;
window->set_should_exit_event_loop_on_close(true);
window->set_double_buffering_enabled(false); window->set_double_buffering_enabled(false);
window->set_title("Snake"); window->set_title("Snake");
window->set_rect(100, 100, 320, 320); window->set_rect(100, 100, 320, 320);