X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f71d8b3de05aaa06e866acb9aa70123dd54b8ffc..1398e483ccfe6419beb875980f4f58f56fdf464a:/src/osx/carbon/nonownedwnd.cpp diff --git a/src/osx/carbon/nonownedwnd.cpp b/src/osx/carbon/nonownedwnd.cpp index 2fe95a95cc..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 ; @@ -1535,7 +1545,7 @@ bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) wxRect client = wxGetClientDisplayRect() ; - int left , top , right , bottom ; + int left, top, width, height ; int x, y, w, h ; x = client.x ; @@ -1543,19 +1553,23 @@ bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) w = client.width ; h = client.height ; - GetContentArea( left , top , right , bottom ) ; + GetContentArea( left, top, width, height ) ; + int outerwidth, outerheight; + GetSize( outerwidth, outerheight ); if ( style & wxFULLSCREEN_NOCAPTION ) { y -= top ; h += top ; + // avoid adding the caption twice to the height + outerheight -= top; } if ( style & wxFULLSCREEN_NOBORDER ) { x -= left ; - w += left + right ; - h += bottom ; + w += outerwidth - width; + h += outerheight - height; } if ( style & wxFULLSCREEN_NOTOOLBAR )