mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 311466 - On OS X, open the app in safe-mode if the option key is pressed during startup. r=bsmedberg.
This commit is contained in:
parent
18433125e1
commit
3f9c1b04d6
@ -164,6 +164,7 @@
|
||||
|
||||
#if defined (XP_MACOSX)
|
||||
#include <Processes.h>
|
||||
#include <Events.h>
|
||||
#endif
|
||||
|
||||
extern "C" void ShowOSAlert(const char* aMessage);
|
||||
@ -1907,7 +1908,11 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||
ScopedFPHandler handler;
|
||||
#endif /* XP_OS2 */
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (CheckArg("safe-mode") || GetCurrentKeyModifiers() & optionKey)
|
||||
#else
|
||||
if (CheckArg("safe-mode"))
|
||||
#endif
|
||||
gSafeMode = PR_TRUE;
|
||||
|
||||
// Handle -help and -version command line arguments.
|
||||
|
@ -167,9 +167,6 @@ nsresult nsMacCommandLine::Initialize(int& argc, char**& argv)
|
||||
err = ::AEProcessAppleEvent(&anEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if (GetCurrentKeyModifiers() & optionKey)
|
||||
AddToCommandLine("-p");
|
||||
|
||||
// we've started up now
|
||||
mStartedUp = PR_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user