mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11550
This commit is contained in:
parent
869aa34aab
commit
cbc7b99053
|
@ -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
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue