mirror of https://github.com/BOINC/boinc.git
Mac MGR: don't show exit confirmation dialog if shutting down or restarting system
svn path=/trunk/boinc/; revision=19646
This commit is contained in:
parent
a8a393b2ef
commit
1ed1ed95f2
|
@ -9363,3 +9363,10 @@ Charlie 18 Nov 2009
|
|||
mac_build/
|
||||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
||||
Charlie 19 Nov 2009
|
||||
- Mac MGR: fix bug - don't show exit confirmation dialog if shutting
|
||||
down or restarting system.
|
||||
|
||||
clientgui/
|
||||
BOINCGUIApp.cpp
|
||||
|
|
|
@ -72,8 +72,7 @@ bool s_bSkipExitConfirmation = false;
|
|||
OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon ) {
|
||||
DescType senderType;
|
||||
Size actualSize;
|
||||
ProcessSerialNumber SenderPSN, ourPSN;
|
||||
Boolean isSame;
|
||||
ProcessSerialNumber SenderPSN;
|
||||
ProcessInfoRec pInfo;
|
||||
FSSpec fileSpec;
|
||||
OSStatus anErr;
|
||||
|
@ -89,28 +88,18 @@ OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt
|
|||
&senderType, &SenderPSN, sizeof(SenderPSN), &actualSize);
|
||||
|
||||
if (anErr == noErr) {
|
||||
|
||||
GetCurrentProcess(&ourPSN);
|
||||
pInfo.processInfoLength = sizeof( ProcessInfoRec );
|
||||
pInfo.processName = NULL;
|
||||
pInfo.processAppSpec = &fileSpec;
|
||||
|
||||
anErr = SameProcess(&SenderPSN, &ourPSN, &isSame);
|
||||
anErr = GetProcessInformation(&SenderPSN, &pInfo);
|
||||
|
||||
if (anErr == noErr) {
|
||||
if (!isSame) {
|
||||
|
||||
pInfo.processInfoLength = sizeof( ProcessInfoRec );
|
||||
pInfo.processName = NULL;
|
||||
pInfo.processAppSpec = &fileSpec;
|
||||
|
||||
anErr = GetProcessInformation(&SenderPSN, &pInfo);
|
||||
|
||||
// Consider a Quit command from our Dock menu as coming from this application
|
||||
if (pInfo.processSignature != 'dock') {
|
||||
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
|
||||
wxGetApp().ExitMainLoop(); // Prevents wxMac from issuing events to closed frames
|
||||
}
|
||||
// Consider a Quit command from our Dock menu as coming from this application
|
||||
if ( (pInfo.processSignature != 'dock') && (pInfo.processSignature != 'BNC!') ) {
|
||||
s_bSkipExitConfirmation = true; // Not from our app, our dock icon or our taskbar icon
|
||||
wxGetApp().ExitMainLoop(); // Prevents wxMac from issuing events to closed frames
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wxGetApp().MacHandleAEQuit((AppleEvent*)appleEvt, reply);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue