diff options
-rw-r--r-- | src/Workspace.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index d92ef76..8f0433f 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Workspace.cc,v 1.9 2002/02/09 16:41:53 fluxgen Exp $ | 25 | // $Id: Workspace.cc,v 1.10 2002/02/10 19:05:12 fluxgen Exp $ |
26 | 26 | ||
27 | // use GNU extensions | 27 | // use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -55,6 +55,8 @@ | |||
55 | #include <X11/Xatom.h> | 55 | #include <X11/Xatom.h> |
56 | 56 | ||
57 | #include <algorithm> | 57 | #include <algorithm> |
58 | #include <iostream> | ||
59 | using namespace std; | ||
58 | 60 | ||
59 | Workspace::Workspace(BScreen *scrn, int i): | 61 | Workspace::Workspace(BScreen *scrn, int i): |
60 | screen(scrn), | 62 | screen(scrn), |
@@ -332,12 +334,12 @@ void Workspace::setName(char *new_name) { | |||
332 | 334 | ||
333 | 335 | ||
334 | void Workspace::shutdown(void) { | 336 | void Workspace::shutdown(void) { |
335 | Windows::iterator it = windowList.begin(); | 337 | |
336 | Windows::iterator it_end= windowList.end(); | 338 | while (!windowList.empty()) { |
337 | for (; it != it_end; ++it) { | 339 | windowList.back()->restore(); |
338 | (*it)->restore(); | 340 | delete windowList.back(); //delete window (the window removes it self from windowList) |
339 | delete (*it); | ||
340 | } | 341 | } |
342 | |||
341 | } | 343 | } |
342 | 344 | ||
343 | 345 | ||