fixed bug in shutdown

This commit is contained in:
fluxgen 2002-02-10 19:05:12 +00:00
parent 31f552fa34
commit f3eb92dd39

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Workspace.cc,v 1.9 2002/02/09 16:41:53 fluxgen Exp $ // $Id: Workspace.cc,v 1.10 2002/02/10 19:05:12 fluxgen Exp $
// use GNU extensions // use GNU extensions
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
@ -55,6 +55,8 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <algorithm> #include <algorithm>
#include <iostream>
using namespace std;
Workspace::Workspace(BScreen *scrn, int i): Workspace::Workspace(BScreen *scrn, int i):
screen(scrn), screen(scrn),
@ -332,12 +334,12 @@ void Workspace::setName(char *new_name) {
void Workspace::shutdown(void) { void Workspace::shutdown(void) {
Windows::iterator it = windowList.begin();
Windows::iterator it_end= windowList.end(); while (!windowList.empty()) {
for (; it != it_end; ++it) { windowList.back()->restore();
(*it)->restore(); delete windowList.back(); //delete window (the window removes it self from windowList)
delete (*it);
} }
} }