[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-commits
Subject: [haiku-commits] haiku: hrev54594 - src/apps/firstbootprompt
From: Adrien Destugues <pulkomandy () gmail ! com>
Date: 2020-09-22 15:38:20
Message-ID: 20200922153820.1AB3124E67 () turing ! freelists ! org
[Download RAW message or body]
hrev54594 adds 1 changeset to branch 'master'
old head: 56ce1249b2b02f9222de845a52d60b0c8207519d
new head: 0b07cea059ff12cacf23e2e97276b21b90db24d3
overview: https://git.haiku-os.org/haiku/log/?qt=range&q=0b07cea059ff+%5E56ce1249b2b0
----------------------------------------------------------------------------
0b07cea059ff: FirstBootPrompt: Another fix for #16525
If we quit the app before handling the "reboot requested" message, the
system doesn't reboot.
[ Adrien Destugues <pulkomandy@pulkomandy.tk> ]
----------------------------------------------------------------------------
Revision: hrev54594
Commit: 0b07cea059ff12cacf23e2e97276b21b90db24d3
URL: https://git.haiku-os.org/haiku/commit/?id=0b07cea059ff
Author: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue Sep 22 15:37:01 2020 UTC
Ticket: https://dev.haiku-os.org/ticket/16525
----------------------------------------------------------------------------
1 file changed, 5 insertions(+), 3 deletions(-)
src/apps/firstbootprompt/BootPromptWindow.cpp | 8 +++++---
----------------------------------------------------------------------------
diff --git a/src/apps/firstbootprompt/BootPromptWindow.cpp \
b/src/apps/firstbootprompt/BootPromptWindow.cpp index a74b6111e1..6869233a53 100644
--- a/src/apps/firstbootprompt/BootPromptWindow.cpp
+++ b/src/apps/firstbootprompt/BootPromptWindow.cpp
@@ -327,16 +327,18 @@ BootPromptWindow::QuitRequested()
"restart your system!"),
B_TRANSLATE("Cancel"), B_TRANSLATE("Restart system"), NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT);
+ // If there is not enough memory to create the alert here, we may as
+ // well try to reboot. There probably isn't much else to do anyway.
if (alert != NULL) {
alert->SetShortcut(0, B_ESCAPE);
- if (alert->Go() == 0) {
+ if (alert->Go() == 0)
return false;
- }
}
be_app->PostMessage(MSG_REBOOT_REQUESTED);
-
+ // Don't quit, instead let the app run and handle the reboot request
+ return false;
} else {
// The aforementioned warning is only shown if the condition
// is true, because if FirstBootPrompt is running on the Desktop,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic