X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4afc5ec3793511a2606d749d68d2f0f80155871..c443ff6f5350df36902af42d0193e53d79dd6a14:/src/osx/carbon/nonownedwnd.cpp?ds=sidebyside diff --git a/src/osx/carbon/nonownedwnd.cpp b/src/osx/carbon/nonownedwnd.cpp index 67c13fac0b..179f6b4997 100644 --- a/src/osx/carbon/nonownedwnd.cpp +++ b/src/osx/carbon/nonownedwnd.cpp @@ -611,9 +611,9 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), // instead of its children (wxToolBarTools) ControlRef parent ; GetSuperControl(control, &parent ); - wxWindow *wxParent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ; - if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) ) - currentMouseWindow = wxParent ; + wxWindow *wxparent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ; + if ( wxparent && wxparent->IsKindOf( CLASSINFO( wxToolBar ) ) ) + currentMouseWindow = wxparent ; #endif } #endif @@ -733,7 +733,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), wxWindow* cursorTarget = currentMouseWindow ; wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ; - + extern wxCursor gGlobalCursor; if (!gGlobalCursor.IsOk()) @@ -749,6 +749,16 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), } else // currentMouseWindow == NULL { + if (toplevelWindow && !control) + { + extern wxCursor gGlobalCursor; + if (!gGlobalCursor.IsOk()) + { + // update cursor when over toolbar and titlebar etc. + wxSTANDARD_CURSOR->MacInstall() ; + } + } + // don't mess with controls we don't know about // for some reason returning eventNotHandledErr does not lead to the correct behaviour // so we try sending them the correct control directly @@ -1171,7 +1181,7 @@ void wxNonOwnedWindowCarbonImpl::Create( const wxPoint& pos, const wxSize& size, long style, long extraStyle, - const wxString& name ) + const wxString& WXUNUSED(name) ) { OSStatus err = noErr ;