Fix uniconizing hidden top level windows in wxMSW.
wxTLW wasn't properly restored if Iconize(false) was called while the window was hidden. Fix this by adding yet another special case to wxTopLevelWindowMSW::Show(). This makes it even less comprehensible than before but there doesn't seem to be any obvious way to simplify this code without totally changing it. Closes #14539. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
45a04dd31a
commit
ef40bc3dae
@ -548,6 +548,7 @@ wxMSW:
|
||||
|
||||
- Add support for CURRENCY and SCODE types to OLE Automation helpers (PB).
|
||||
- Allow setting LCID used by wxAutomationObject (PB).
|
||||
- Fix calling Iconize(false) on hidden top level windows (Christian Walther).
|
||||
|
||||
|
||||
2.9.4: (released 2012-07-09)
|
||||
|
@ -709,9 +709,21 @@ bool wxTopLevelWindowMSW::Show(bool show)
|
||||
}
|
||||
else if ( m_iconized )
|
||||
{
|
||||
// iconize and show
|
||||
// We were iconized while we were hidden, so now we need to show
|
||||
// the window in iconized state.
|
||||
nShowCmd = SW_MINIMIZE;
|
||||
}
|
||||
else if ( ::IsIconic(GetHwnd()) )
|
||||
{
|
||||
// We were restored while we were hidden, so now we need to show
|
||||
// the window in its normal state.
|
||||
//
|
||||
// As below, don't activate some kinds of windows.
|
||||
if ( HasFlag(wxFRAME_TOOL_WINDOW) || !IsEnabled() )
|
||||
nShowCmd = SW_SHOWNOACTIVATE;
|
||||
else
|
||||
nShowCmd = SW_RESTORE;
|
||||
}
|
||||
else // just show
|
||||
{
|
||||
// we shouldn't use SW_SHOW which also activates the window for
|
||||
@ -823,9 +835,9 @@ void wxTopLevelWindowMSW::Iconize(bool iconize)
|
||||
}
|
||||
else // hidden
|
||||
{
|
||||
// iconizing the window shouldn't show it so just remember that we need
|
||||
// to become iconized when shown later
|
||||
m_iconized = true;
|
||||
// iconizing the window shouldn't show it so just update the internal
|
||||
// state (otherwise it's done by DoShowWindow() itself)
|
||||
m_iconized = iconize;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user