[Bf-blender-cvs] [45adcc51b21] master: macOS: Remove workaround for old quit dialog

Julian Eisel noreply at git.blender.org
Thu May 7 13:57:16 CEST 2020


Commit: 45adcc51b21d626238b25428f791937148cf0a20
Author: Julian Eisel
Date:   Thu May 7 12:32:49 2020 +0200
Branches: master
https://developer.blender.org/rB45adcc51b21d626238b25428f791937148cf0a20

macOS: Remove workaround for old quit dialog

Got added in 1a30e52142c5 (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.

===================================================================

M	intern/ghost/intern/GHOST_SystemCocoa.mm

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 2b6a2902757..5592078e20e 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -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);



More information about the Bf-blender-cvs mailing list