X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3722eeb81ca2d27b81fe689a8329ceef12cc771..a3e76614adbcebebc7ec4f64407d6b09a12d0892:/src/mac/app.cpp diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 1ba9086062..1a02ff2e58 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -976,19 +976,24 @@ bool wxApp::Yield(bool onlyIfNeeded) void wxApp::MacSuspend( bool convertClipboard ) { - // we have to deactive the window manually + // we have to deactive the top level windows manually - wxTopLevelWindow* window = (wxTopLevelWindow*) GetTopWindow() ; - if ( window ) - window->MacActivate( MacGetCurrentEvent() , false ) ; + wxNode* node = wxTopLevelWindows.First(); + while (node) + { + wxTopLevelWindow* win = (wxTopLevelWindow*) node->Data(); + win->MacActivate( MacGetCurrentEvent() , false ) ; - s_lastMouseDown = 0 ; - if( convertClipboard ) - { - MacConvertPrivateToPublicScrap() ; - } + node = node->Next(); + } + + s_lastMouseDown = 0 ; + if( convertClipboard ) + { + MacConvertPrivateToPublicScrap() ; + } - ::HideFloatingWindows() ; + ::HideFloatingWindows() ; } void wxApp::MacResume( bool convertClipboard ) @@ -1156,7 +1161,6 @@ void wxApp::MacHandleMouseDownEvent( EventRecord *ev ) #else SetPort( (window) ) ; #endif - SetOrigin( 0 , 0 ) ; LocalToGlobal( &pt ) ; SetPort( port ) ; win->SetSize( pt.h , pt.v , -1 , @@ -1227,7 +1231,6 @@ void wxApp::MacHandleMouseDownEvent( EventRecord *ev ) #else SetPort( (window) ) ; #endif - SetOrigin( 0 , 0 ) ; SetPort( port ) ; } if ( window != frontWindow && wxTheApp->s_captureWindow == NULL )