diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-25 17:25:59 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-25 17:25:59 +0400 |
commit | 4d156ec19511ee10f8659b4f089891bbd67bd59a (patch) | |
tree | 1fb6fb02897cf950a83a90db4e70abe85b0d4a46 /intern | |
parent | 4f9c36905700af342f9adba4e033e8e29bdfb224 (diff) |
- found the bad line in Ghost that preventing closing windows.
I've mailed Maarten to verify it, this commit is for test at other
OSX platforms.
- this was the baddie:
setDrawingContextType(GHOST_kDrawingContextTypeNone);
it was called in the window destructor, for each window closed.
I've hacked in a temporal global var to store the mainwindow. When this
line is only called for mainwindow, it all works smoothly.
- next commit is needed too!
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCarbon.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp index 35e1efc793e..f8374134d65 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.cpp +++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp @@ -67,6 +67,8 @@ AGL_DEPTH_SIZE, 16, AGL_NONE, }; +WindowRef ugly_hack=NULL; + GHOST_WindowCarbon::GHOST_WindowCarbon( const STR_String& title, GHOST_TInt32 left, @@ -106,6 +108,7 @@ GHOST_WindowCarbon::GHOST_WindowCarbon( updateDrawingContext(); activateDrawingContext(); } + if(ugly_hack==NULL) ugly_hack= m_windowRef; } else { /* @@ -133,8 +136,10 @@ GHOST_WindowCarbon::~GHOST_WindowCarbon() { if (m_customCursor) delete m_customCursor; - //GHOST_PRINT("GHOST_WindowCarbon::~GHOST_WindowCarbon(): removing drawing context\n"); - setDrawingContextType(GHOST_kDrawingContextTypeNone); + if(ugly_hack==m_windowRef) ugly_hack= NULL; + + // printf("GHOST_WindowCarbon::~GHOST_WindowCarbon(): removing drawing context\n"); + if(ugly_hack==NULL) setDrawingContextType(GHOST_kDrawingContextTypeNone); if (m_windowRef) { ::DisposeWindow(m_windowRef); m_windowRef = 0; @@ -333,6 +338,7 @@ GHOST_TSuccess GHOST_WindowCarbon::setOrder(GHOST_TWindowOrder order) ::SelectWindow(m_windowRef); } else { + /* doesnt work if you do this with a mouseclick */ ::SendBehind(m_windowRef, nil); } return GHOST_kSuccess; |