From bc7bf727dda40d34970232af6e5b01d2bb5673ec Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 19 May 2020 17:28:40 +0200 Subject: [PATCH] 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. --- Services/SystemMenu/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Services/SystemMenu/main.cpp b/Services/SystemMenu/main.cpp index 3214557d6c..3cf4c064db 100644 --- a/Services/SystemMenu/main.cpp +++ b/Services/SystemMenu/main.cpp @@ -65,6 +65,7 @@ static NonnullRefPtr 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();