summaryrefslogtreecommitdiff
path: root/Services/SystemMenu/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-19 17:28:40 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-19 17:46:28 +0200
commitbc7bf727dda40d34970232af6e5b01d2bb5673ec (patch)
treef433792f4b0685f0bc9e7418bdbf107851aac3c4 /Services/SystemMenu/main.cpp
parentefb3a34e43c370b74eec6f36db4c27c3a5bf63f8 (diff)
downloadserenity-bc7bf727dda40d34970232af6e5b01d2bb5673ec.zip
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.
Diffstat (limited to 'Services/SystemMenu/main.cpp')
-rw-r--r--Services/SystemMenu/main.cpp1
1 files changed, 1 insertions, 0 deletions
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<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();