[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60409] trunk/blender/intern/ghost/intern: OSX: make sure closing the mainwindow forewards to the quitdialog - todo: check if m_window now public is a problem
jens verwiebe
info at jensverwiebe.de
Sat Sep 28 19:55:22 CEST 2013
Revision: 60409
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60409
Author: jensverwiebe
Date: 2013-09-28 17:55:22 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
OSX: make sure closing the mainwindow forewards to the quitdialog - todo: check if m_window now public is a problem
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.h
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-09-28 17:14:00 UTC (rev 60408)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-09-28 17:55:22 UTC (rev 60409)
@@ -1018,12 +1018,20 @@
//Note: called from NSWindow delegate
GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window)
{
+ NSArray *windowsList;
+ windowsList = [NSApp orderedWindows];
if (!validWindow(window)) {
return GHOST_kFailure;
}
switch (eventType) {
case GHOST_kEventWindowClose:
- pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
+ // make sure index 1 exists and compare window adress
+ if ([windowsList count] > 1 && (window->m_window != [windowsList objectAtIndex:1])) {
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
+ }
+ else {
+ handleQuitRequest(); // -> quit dialog
+ }
break;
case GHOST_kEventWindowActivate:
m_windowManager->setActiveWindow(window);
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.h 2013-09-28 17:14:00 UTC (rev 60408)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.h 2013-09-28 17:55:22 UTC (rev 60409)
@@ -269,6 +269,9 @@
GHOST_TSuccess beginFullScreen() const {return GHOST_kFailure;}
GHOST_TSuccess endFullScreen() const {return GHOST_kFailure;}
+
+ /** The window containing the OpenGL view */
+ CocoaWindow *m_window;
protected:
@@ -318,8 +321,8 @@
virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
- /** The window containing the OpenGL view */
- CocoaWindow *m_window;
+// /** The window containing the OpenGL view */
+// CocoaWindow *m_window;
/** The openGL view */
CocoaOpenGLView *m_openGLView;
More information about the Bf-blender-cvs
mailing list