mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
SystemMenu: Fix shutdown dialog
It was shutting down even if selected Restart.
This commit is contained in:
parent
b8dc1fc195
commit
abdf36b171
Notes:
sideshowbarker
2024-07-19 05:20:28 +09:00
Author: https://github.com/sppmacd 🔰
Commit: abdf36b171
Pull-request: https://github.com/SerenityOS/serenity/pull/2652
1 changed files with 4 additions and 3 deletions
|
@ -51,9 +51,10 @@ static const Vector<Option> options = {
|
||||||
|
|
||||||
Vector<char const*> ShutdownDialog::show()
|
Vector<char const*> ShutdownDialog::show()
|
||||||
{
|
{
|
||||||
auto rc = ShutdownDialog::construct()->exec();
|
auto dialog = ShutdownDialog::construct();
|
||||||
if (rc == ExecResult::ExecOK)
|
auto rc = dialog->exec();
|
||||||
return options[rc].cmd;
|
if (rc == ExecResult::ExecOK && dialog->m_selected_option != -1)
|
||||||
|
return options[dialog->m_selected_option].cmd;
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue