Taskbar: Made it possible to add a system menu to taskbar later

This makes it possible to construct the taskbar before the system
menu and remove the awkward reference in Taskbar/main.cpp
This commit is contained in:
Arda Cinar 2022-11-25 18:13:12 +03:00 committed by Andreas Kling
commit 7afb7e65d5
Notes: sideshowbarker 2024-07-17 04:03:05 +09:00
3 changed files with 28 additions and 14 deletions

View file

@ -70,7 +70,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto menu = TRY(build_system_menu(window_ref));
menu->realize_menu_if_needed();
auto window = TRY(TaskbarWindow::try_create(move(menu)));
auto window = TRY(TaskbarWindow::try_create());
window->add_system_menu(menu);
window_ref.window = window.ptr();
window->show();