// 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
wxWindow* cursorTarget = currentMouseWindow ;
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
-
+
extern wxCursor gGlobalCursor;
if (!gGlobalCursor.IsOk())
}
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
if ( (attributes & kWindowBoundsChangeSizeChanged) || (attributes & kWindowBoundsChangeOriginChanged) )
{
// all (Mac) rects are in content area coordinates, all wxRects in structure coordinates
- int left , top , right , bottom ;
-
- toplevelWindow->GetNonOwnedPeer()->GetContentArea(left, top, right, bottom);
-
+ int left , top , width , height ;
+ // structure width
+ int swidth, sheight;
+
+ toplevelWindow->GetNonOwnedPeer()->GetContentArea(left, top, width, height);
+ toplevelWindow->GetNonOwnedPeer()->GetSize(swidth, sheight);
+ int deltawidth = swidth - width;
+ int deltaheight = sheight - height;
wxRect adjustR(
newRect.left - left,
newRect.top - top,
- newRect.right - newRect.left + left + right,
- newRect.bottom - newRect.top + top + bottom ) ;
+ newRect.right - newRect.left + deltawidth,
+ newRect.bottom - newRect.top + deltaheight ) ;
toplevelWindow->HandleResizing( cEvent.GetTicks(), &adjustR );
- const Rect adjustedRect = { adjustR.y + top , adjustR.x + left , adjustR.y + adjustR.height - bottom , adjustR.x + adjustR.width - right } ;
+ const Rect adjustedRect = { adjustR.y + top , adjustR.x + left , adjustR.y + top + adjustR.height - deltaheight ,
+ adjustR.x + left + adjustR.width - deltawidth } ;
if ( !EqualRect( &newRect , &adjustedRect ) )
cEvent.SetParameter<Rect>( kEventParamCurrentBounds , &adjustedRect ) ;
}
wxRect client = wxGetClientDisplayRect() ;
- int left , top , right , bottom ;
+ int left, top, width, height ;
int x, y, w, h ;
x = client.x ;
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 )