Centering maximized wxTLWs on screen should do nothing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -383,9 +383,7 @@ bool MyApp::OnInit()
|
|||||||
myCanvas = new MyCanvas(frame);
|
myCanvas = new MyCanvas(frame);
|
||||||
myCanvas->SetBackgroundColour(*wxWHITE);
|
myCanvas->SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
#ifndef __WXWINCE__
|
|
||||||
frame->Centre(wxBOTH);
|
frame->Centre(wxBOTH);
|
||||||
#endif
|
|
||||||
|
|
||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: common/toplvcmn.cpp
|
// Name: src/common/toplvcmn.cpp
|
||||||
// Purpose: common (for all platforms) wxTopLevelWindow functions
|
// Purpose: common (for all platforms) wxTopLevelWindow functions
|
||||||
// Author: Julian Smart, Vadim Zeitlin
|
// Author: Julian Smart, Vadim Zeitlin
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
@@ -187,6 +187,10 @@ void wxTopLevelWindowBase::DoCentre(int dir)
|
|||||||
rectParent = rectDisplay;
|
rectParent = rectDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// centering maximized window on screen is no-op
|
||||||
|
if((rectParent == rectDisplay) && IsMaximized())
|
||||||
|
return;
|
||||||
|
|
||||||
// the new window rect candidate
|
// the new window rect candidate
|
||||||
wxRect rect = GetRect().CentreIn(rectParent, dir);
|
wxRect rect = GetRect().CentreIn(rectParent, dir);
|
||||||
|
|
||||||
@@ -345,4 +349,3 @@ void wxTopLevelWindowBase::RequestUserAttention(int WXUNUSED(flags))
|
|||||||
// it's probably better than do nothing, isn't it?
|
// it's probably better than do nothing, isn't it?
|
||||||
Raise();
|
Raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -724,8 +724,8 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
|
|||||||
|
|
||||||
bool wxTopLevelWindowMSW::IsMaximized() const
|
bool wxTopLevelWindowMSW::IsMaximized() const
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||||
return false;
|
return true;
|
||||||
#else
|
#else
|
||||||
return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
|
return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user