OSX/GHOST: refine #60409 and better take multiple windows into account

This commit is contained in:
Jens Verwiebe
2013-10-02 18:49:32 +00:00
parent a47e6810a2
commit 8686f9fe03

View File

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