From 7f99497378a7882e2795cf465fccc7f12f188274 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 28 Jul 2021 11:35:39 +0200 Subject: [PATCH] Pong: Add menus before showing the window Otherwise, space is reserved but menus aren't shown. --- Userland/Games/Pong/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index 5c2a8d50950..09210e1e07e 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -53,7 +53,6 @@ int main(int argc, char** argv) window->set_double_buffering_enabled(false); window->set_main_widget(); window->set_resizable(false); - window->show(); auto& game_menu = window->add_menu("&Game"); game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { @@ -63,5 +62,7 @@ int main(int argc, char** argv) auto& help_menu = window->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Pong", app_icon, window)); + window->show(); + return app->exec(); }