+ wxPoint pos(posOrig);
+ if ( !pos.IsFullySpecified() )
+ {
+ wxRect rectWin = wxRect(size).CentreIn(wxGetClientDisplayRect());
+
+ // The size of the window is often not really known yet, TLWs are often
+ // created with some small initial size and later are fitted to contain
+ // their children so centering the window will show it too much to the
+ // right and bottom, adjust for it by putting it more to the left and
+ // center.
+ rectWin.x /= 2;
+ rectWin.y /= 2;
+
+ pos.SetDefaults(rectWin.GetPosition());
+ }
+