Also update cursor when over toolbar and titlebar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -611,9 +611,9 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
|||||||
// instead of its children (wxToolBarTools)
|
// instead of its children (wxToolBarTools)
|
||||||
ControlRef parent ;
|
ControlRef parent ;
|
||||||
GetSuperControl(control, &parent );
|
GetSuperControl(control, &parent );
|
||||||
wxWindow *wxParent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ;
|
wxWindow *wxparent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ;
|
||||||
if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) )
|
if ( wxparent && wxparent->IsKindOf( CLASSINFO( wxToolBar ) ) )
|
||||||
currentMouseWindow = wxParent ;
|
currentMouseWindow = wxparent ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -733,7 +733,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
|||||||
|
|
||||||
wxWindow* cursorTarget = currentMouseWindow ;
|
wxWindow* cursorTarget = currentMouseWindow ;
|
||||||
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
|
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
|
||||||
|
|
||||||
extern wxCursor gGlobalCursor;
|
extern wxCursor gGlobalCursor;
|
||||||
|
|
||||||
if (!gGlobalCursor.IsOk())
|
if (!gGlobalCursor.IsOk())
|
||||||
@@ -749,6 +749,17 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
|||||||
}
|
}
|
||||||
else // currentMouseWindow == NULL
|
else // currentMouseWindow == NULL
|
||||||
{
|
{
|
||||||
|
if (toplevelWindow && !control)
|
||||||
|
{
|
||||||
|
extern wxCursor gGlobalCursor;
|
||||||
|
if (!gGlobalCursor.IsOk())
|
||||||
|
{
|
||||||
|
// update cursor when over toolbar and titlebar etc.
|
||||||
|
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
|
||||||
|
toplevelWindow->MacSetupCursor( cursorPoint );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// don't mess with controls we don't know about
|
// don't mess with controls we don't know about
|
||||||
// for some reason returning eventNotHandledErr does not lead to the correct behaviour
|
// for some reason returning eventNotHandledErr does not lead to the correct behaviour
|
||||||
// so we try sending them the correct control directly
|
// so we try sending them the correct control directly
|
||||||
|
Reference in New Issue
Block a user