SystemMenu: Don't exit if the shutdown dialog is opened but cancelled

Previously opening the shutdown dialog and cancelling out of it would
cause SystemMenu to exit due to the exit-when-there-are-no-more-windows
mechanism in GUI::Application. Fix this by opting out of it.
This commit is contained in:
Andreas Kling 2020-05-19 17:28:40 +02:00
parent efb3a34e43
commit bc7bf727dd
Notes: sideshowbarker 2024-07-19 06:23:43 +09:00

View File

@ -65,6 +65,7 @@ static NonnullRefPtr<GUI::Menu> build_system_menu();
int main(int argc, char** argv)
{
GUI::Application app(argc, argv);
app.set_quit_when_last_window_deleted(false);
auto menu = build_system_menu();
menu->realize_menu_if_needed();