summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
409e6ce)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52801
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// { kEventClassControl , kEventControlBoundsChanged } ,
} ;
// { kEventClassControl , kEventControlBoundsChanged } ,
} ;
+wxWindowMac* targetWindow = NULL;
+
static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
inKillFocusEvent = true ;
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
event.SetEventObject(thisWindow);
inKillFocusEvent = true ;
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
event.SetEventObject(thisWindow);
+ event.SetWindow(targetWindow);
thisWindow->HandleWindowEvent(event) ;
inKillFocusEvent = false ;
}
thisWindow->HandleWindowEvent(event) ;
inKillFocusEvent = false ;
}
}
#endif
ControlPartCode controlPart = cEvent.GetParameter<ControlPartCode>(kEventParamControlPart , typeControlPartCode );
}
#endif
ControlPartCode controlPart = cEvent.GetParameter<ControlPartCode>(kEventParamControlPart , typeControlPartCode );
+ if ( controlPart != kControlFocusNoPart )
+ targetWindow = thisWindow;
+
ControlPartCode previousControlPart = 0;
verify_noerr( HIViewGetFocusPart(controlRef, &previousControlPart));
ControlPartCode previousControlPart = 0;
verify_noerr( HIViewGetFocusPart(controlRef, &previousControlPart));
- wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+ wxNonOwnedWindow* top = MacGetTopLevelWindow();
if (top)
{
pt.x -= MacGetLeftBorderSize() ;
if (top)
{
pt.x -= MacGetLeftBorderSize() ;
- wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+ wxNonOwnedWindow* top = MacGetTopLevelWindow();
if (top)
{
wxMacControl::Convert( &pt , top->m_peer , m_peer ) ;
if (top)
{
wxMacControl::Convert( &pt , top->m_peer , m_peer ) ;
wxWindowMac *mouseWin = 0 ;
{
wxWindowMac *mouseWin = 0 ;
{
- wxTopLevelWindowMac *tlw = MacGetTopLevelWindow() ;
+ wxNonOwnedWindow *tlw = MacGetTopLevelWindow() ;
WindowRef window = (WindowRef) ( tlw ? tlw->MacGetWindowRef() : 0 ) ;
ControlPartCode part ;
WindowRef window = (WindowRef) ( tlw ? tlw->MacGetWindowRef() : 0 ) ;
ControlPartCode part ;
void wxWindowMac::Update()
{
void wxWindowMac::Update()
{
- wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+ wxNonOwnedWindow* top = MacGetTopLevelWindow();
if (top)
top->MacPerformUpdates() ;
}
if (top)
top->MacPerformUpdates() ;
}
-wxTopLevelWindowMac* wxWindowMac::MacGetTopLevelWindow() const
+wxNonOwnedWindow* wxWindowMac::MacGetTopLevelWindow() const
- wxTopLevelWindowMac* win = NULL ;
+ wxNonOwnedWindow* win = NULL ;
WindowRef window = (WindowRef) MacGetTopLevelWindowRef() ;
if ( window )
win = wxFindWinFromMacWindow( window ) ;
WindowRef window = (WindowRef) MacGetTopLevelWindowRef() ;
if ( window )
win = wxFindWinFromMacWindow( window ) ;
#if wxUSE_POPUPWIN
wxPopupWindow* popupwin = wxDynamicCast(iter,wxPopupWindow);
if ( popupwin )
#if wxUSE_POPUPWIN
wxPopupWindow* popupwin = wxDynamicCast(iter,wxPopupWindow);
if ( popupwin )
- return popupwin->MacGetPopupWindowRef();
+ return popupwin->MacGetWindowRef();
#endif
}
iter = iter->GetParent() ;
#endif
}
iter = iter->GetParent() ;