Fix restoring application window when clicking on dock icon
This didn't work any more since IsShown() returned true even for iconized windows, so we never did anything if all windows (and, in particular, the only window) were (was) iconized. Fix this by checking for IsIconized() first and IsShown() only if it returns false because it seems that IsShown() is indeed supposed to return true for iconized windows -- at least it also does it in wxMSW. Closes #18998. Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
This commit is contained in:
committed by
Vadim Zeitlin
parent
859193fb65
commit
9a1e820cc1
@@ -169,16 +169,16 @@ void wxApp::MacReopenApp()
|
||||
while (node)
|
||||
{
|
||||
wxTopLevelWindow* win = (wxTopLevelWindow*) node->GetData();
|
||||
if ( win->IsShown() )
|
||||
{
|
||||
// we do have a visible, non-iconized toplevelwindow -> do nothing
|
||||
return;
|
||||
}
|
||||
else if ( win->IsIconized() )
|
||||
if ( win->IsIconized() )
|
||||
{
|
||||
if ( firstIconized == NULL )
|
||||
firstIconized = win;
|
||||
}
|
||||
else if ( win->IsShown() )
|
||||
{
|
||||
// we do have a visible, non-iconized toplevelwindow -> do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
Reference in New Issue
Block a user