From 4b81b9718d78d8b3cb84891552b7d97b2a519303 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 28 Jul 2021 11:38:04 +0200 Subject: [PATCH] Breakout: Add menus before showing the window Otherwise, space is reserved but menus aren't shown. --- Userland/Games/Breakout/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index f65882a687..789f49f1fb 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -45,7 +45,6 @@ int main(int argc, char** argv) auto app_icon = GUI::Icon::default_icon("app-breakout"); window->set_icon(app_icon.bitmap_for_size(16)); auto& game = window->set_main_widget(); - window->show(); auto& game_menu = window->add_menu("&Game"); game_menu.add_action(GUI::Action::create_checkable("&Pause", { {}, Key_P }, [&](auto& action) { @@ -61,5 +60,7 @@ int main(int argc, char** argv) auto& help_menu = window->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Breakout", app_icon, window)); + window->show(); + return app->exec(); }