git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53617
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if((rectParent == rectDisplay) && IsMaximized())
return;
+ if ( !(dir & wxBOTH) )
+ dir |= wxBOTH; // if neither is specified, center in both directions
+
// the new window rect candidate
- wxRect rect = GetRect().CentreIn(rectParent, dir);
+ wxRect rect = GetRect().CentreIn(rectParent, dir & ~wxCENTRE_ON_SCREEN);
// we don't want to place the window off screen if Centre() is called as
// this is (almost?) never wanted and it would be very difficult to prevent