fixed bug in shutdown
fluxgen fluxgen
1 files changed,
8 insertions(+),
6 deletions(-)
jump to
M
src/Workspace.cc
→
src/Workspace.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // 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 #ifndef _GNU_SOURCE@@ -55,6 +55,8 @@ #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <algorithm> +#include <iostream> +using namespace std; Workspace::Workspace(BScreen *scrn, int i): screen(scrn),@@ -332,12 +334,12 @@ }
void Workspace::shutdown(void) { - Windows::iterator it = windowList.begin(); - Windows::iterator it_end= windowList.end(); - for (; it != it_end; ++it) { - (*it)->restore(); - delete (*it); + + while (!windowList.empty()) { + windowList.back()->restore(); + delete windowList.back(); //delete window (the window removes it self from windowList) } + }