Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2013-10-02 22:49:32 +0400
committerJens Verwiebe <info@jensverwiebe.de>2013-10-02 22:49:32 +0400
commit8686f9fe03805b111dee5c33c69d3bbc3eb50aed (patch)
tree836037712090c48d288871fc63d60f7a13ace6ca /intern
parenta47e6810a28714a840a83262734b109a3ac78747 (diff)
OSX/GHOST: refine #60409 and better take multiple windows into account
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index f71d87c6f2f..9cea4210769 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -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 {