macOS: Remove workaround for old quit dialog

Got added in 1a30e52142 (and tweaked in follow-ups) but shouldn't be needed
anymore with the newer popup based quit dialog.

It prevents Blender from quitting properly in case macOS closed all Blender
windows. This may happen in some corner-cases unfortunately (e.g. T74101) which
would be nice to have addressed at some point. Until then, users shouldn't have
to force-kill Blender to shut it down if they run into this.
This commit is contained in:
Julian Eisel 2020-05-07 12:32:49 +02:00
parent b9491476e5
commit 45adcc51b2
1 changed files with 1 additions and 8 deletions

View File

@ -1063,14 +1063,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
}
switch (eventType) {
case GHOST_kEventWindowClose:
// check for index of mainwindow as it would quit blender without dialog and discard
if ([windowsList count] > 1 &&
window->getCocoaWindow() != [windowsList objectAtIndex:[windowsList count] - 1]) {
pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window));
}
else {
handleQuitRequest(); // -> quit dialog
}
pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window));
break;
case GHOST_kEventWindowActivate:
m_windowManager->setActiveWindow(window);