void wxApp::MacSuspend( bool convertClipboard )
{
- // we have to deactive the window manually
+ // we have to deactive the top level windows manually
- wxWindow* window = 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 )
::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ;
short windowPart = ::FindWindow(ev->where, &window);
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( wxPendingDelete.Member(win) )
return ;
#else
SetPort( (window) ) ;
#endif
- SetOrigin( 0 , 0 ) ;
LocalToGlobal( &pt ) ;
SetPort( port ) ;
win->SetSize( pt.h , pt.v , -1 ,
#else
SetPort( (window) ) ;
#endif
- SetOrigin( 0 , 0 ) ;
SetPort( port ) ;
}
if ( window != frontWindow && wxTheApp->s_captureWindow == NULL )
break ;
default:
{
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win )
win->MacMouseUp( ev , windowPart ) ;
}
// if it is a floater we activate/deactivate the front non-floating window instead
window = ::FrontNonFloatingWindow() ;
}
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win )
win->MacActivate( ev , activate ) ;
}
void wxApp::MacHandleUpdateEvent( EventRecord *ev )
{
WindowRef window = (WindowRef) ev->message ;
- wxWindow * win = wxFindWinFromMacWindow( window ) ;
+ wxTopLevelWindowMac * win = wxFindWinFromMacWindow( window ) ;
if ( win )
{
if ( !wxPendingDelete.Member(win) )
- win->MacUpdate( ev ) ;
+ win->MacUpdate( ev->when ) ;
}
else
{
if ( oldFrontWindow )
{
- wxWindow* win = wxFindWinFromMacWindow( oldFrontWindow ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( oldFrontWindow ) ;
if ( win )
win->MacActivate( ev , false ) ;
}
if ( newFrontWindow )
{
- wxWindow* win = wxFindWinFromMacWindow( newFrontWindow ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( newFrontWindow ) ;
if ( win )
win->MacActivate( ev , true ) ;
}
::GetNextEvent(0, &tmp);
ev->modifiers = tmp.modifiers;
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
+ wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win )
win->MacMouseMoved( ev , windowPart ) ;
else