*** empty log message ***

svn path=/trunk/boinc/; revision=11550
This commit is contained in:
Charlie Fenton 2006-11-19 13:20:04 +00:00
parent 869aa34aab
commit cbc7b99053
2 changed files with 15 additions and 0 deletions

View File

@ -12692,7 +12692,10 @@ Bruce 19 Nov 2006
Charlie 19 Nov 2006
- MGR: Fix windows compile errors.
- Mac: Ignore Quit AppleEvents if a modal dialog is open (to prevent
crashes if the user selects Quit from the Manager's Dock menu.)
clientgui/
BOINCGUIApp.cpp
sg_ProjectsComponent.cpp
ViewMessages.cpp

View File

@ -805,6 +805,8 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
Boolean isSame;
ProcessInfoRec pInfo;
FSSpec fileSpec;
WindowRef win;
WindowModality modality;
OSStatus anErr;
anErr = AEGetAttributePtr(appleEvt, keyAddressAttr, typeProcessSerialNumber,
@ -824,6 +826,16 @@ OSErr CBOINCGUIApp::QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEven
pInfo.processAppSpec = &fileSpec;
anErr = GetProcessInformation(&SenderPSN, &pInfo);
// Refuse to quit if a modal dialog is open
win = FrontWindow();
if (win) {
GetWindowModality(win, &modality, NULL);
if (modality == kWindowModalityAppModal) {
SysBeep(4);
return userCanceledErr;
}
}
// Consider a Quit command from our Dock menu as coming from this application
if (pInfo.processSignature != 'dock') {