diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 43afd9a3707..9bd74e8180f 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -71,8 +71,16 @@ Desktop::~Desktop() Desktops::Desktops() + : _current_desktop(0) { - _current_desktop = 0; +} + +Desktops::~Desktops() +{ + // show all hidden windows + for(iterator it_dsk=begin(); it_dsk!=end(); ++it_dsk) + for(WindowSet::iterator it=it_dsk->_windows.begin(); it!=it_dsk->_windows.end(); ++it) + ShowWindowAsync(*it, SW_SHOW); } void Desktops::init() diff --git a/reactos/subsys/system/explorer/globals.h b/reactos/subsys/system/explorer/globals.h index 914e0ea93c2..d5339cc39f4 100644 --- a/reactos/subsys/system/explorer/globals.h +++ b/reactos/subsys/system/explorer/globals.h @@ -191,6 +191,7 @@ typedef Desktop DesktopRef; struct Desktops : public vector { Desktops(); + ~Desktops(); void init(); void SwitchToDesktop(int idx);