don't show the currently hidden frame if Iconize() is called (see #10426)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -653,6 +653,11 @@ bool wxTopLevelWindowMSW::Show(bool show)
|
|||||||
|
|
||||||
m_maximizeOnShow = false;
|
m_maximizeOnShow = false;
|
||||||
}
|
}
|
||||||
|
else if ( m_iconized )
|
||||||
|
{
|
||||||
|
// iconize and show
|
||||||
|
nShowCmd = SW_MINIMIZE;
|
||||||
|
}
|
||||||
else // just show
|
else // just show
|
||||||
{
|
{
|
||||||
// we shouldn't use SW_SHOW which also activates the window for
|
// we shouldn't use SW_SHOW which also activates the window for
|
||||||
@@ -736,7 +741,17 @@ bool wxTopLevelWindowMSW::IsMaximized() const
|
|||||||
|
|
||||||
void wxTopLevelWindowMSW::Iconize(bool iconize)
|
void wxTopLevelWindowMSW::Iconize(bool iconize)
|
||||||
{
|
{
|
||||||
DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
|
if ( IsShown() )
|
||||||
|
{
|
||||||
|
// change the window state immediately
|
||||||
|
DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
|
||||||
|
}
|
||||||
|
else // hidden
|
||||||
|
{
|
||||||
|
// iconizing the window shouldn't show it so just remember that we need
|
||||||
|
// to become iconized when shown later
|
||||||
|
m_iconized = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMSW::IsIconized() const
|
bool wxTopLevelWindowMSW::IsIconized() const
|
||||||
@@ -744,6 +759,9 @@ bool wxTopLevelWindowMSW::IsIconized() const
|
|||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
|
if ( !IsShown() )
|
||||||
|
return m_iconized;
|
||||||
|
|
||||||
// don't use m_iconized, it may be briefly out of sync with the real state
|
// don't use m_iconized, it may be briefly out of sync with the real state
|
||||||
// as it's only modified when we receive a WM_SIZE and we could be called
|
// as it's only modified when we receive a WM_SIZE and we could be called
|
||||||
// from an event handler from one of the messages we receive before it,
|
// from an event handler from one of the messages we receive before it,
|
||||||
|
Reference in New Issue
Block a user