moving cursor update AFTER the mouse event handling, otherwise things like eg drawing a splitter from right to left leads to wrong cursor, because - at the time of the cursos update - the splitter is not yet move below the mouse pos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -509,18 +509,6 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
|
|||||||
|
|
||||||
wxevent.SetEventObject( currentMouseWindow ) ;
|
wxevent.SetEventObject( currentMouseWindow ) ;
|
||||||
|
|
||||||
// update cursor
|
|
||||||
|
|
||||||
wxWindow* cursorTarget = currentMouseWindow ;
|
|
||||||
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
|
|
||||||
|
|
||||||
while( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) )
|
|
||||||
{
|
|
||||||
cursorTarget = cursorTarget->GetParent() ;
|
|
||||||
if ( cursorTarget )
|
|
||||||
cursorPoint += cursorTarget->GetPosition() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// make tooltips current
|
// make tooltips current
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
@@ -568,6 +556,19 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
|
|||||||
wxTheApp->s_captureWindow = NULL ;
|
wxTheApp->s_captureWindow = NULL ;
|
||||||
// update cursor ?
|
// update cursor ?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update cursor
|
||||||
|
|
||||||
|
wxWindow* cursorTarget = currentMouseWindow ;
|
||||||
|
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
|
||||||
|
|
||||||
|
while( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) )
|
||||||
|
{
|
||||||
|
cursorTarget = cursorTarget->GetParent() ;
|
||||||
|
if ( cursorTarget )
|
||||||
|
cursorPoint += cursorTarget->GetPosition() ;
|
||||||
|
}
|
||||||
|
|
||||||
} // else if ( currentMouseWindow )
|
} // else if ( currentMouseWindow )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user