void wxTopLevelWindowBase::DoCentre(int dir)
{
+ // on some platforms centering top level windows is impossible
+ // because they are always maximized by guidelines or limitations
+ if(IsAlwaysMaximized())
+ return;
+
// we need the display rect anyhow so store it first
int nDisplay = wxDisplay::GetFromWindow(this);
wxDisplay dpy(nDisplay == wxNOT_FOUND ? 0 : nDisplay);
wxWindow::DoClientToScreen(x, y);
}
+bool wxTopLevelWindowBase::IsAlwaysMaximized() const
+{
+#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
+ return true;
+#else
+ return false;
+#endif
+}
// ----------------------------------------------------------------------------
// event handlers
}
// do we have any children at all?
- if ( child )
+ if ( child && child->IsShown() )
{
// exactly one child - set it's size to fill the whole frame
int clientW, clientH;