From 1762dd8a0bc64c88942908dd87bd94f0fa910ae0 Mon Sep 17 00:00:00 2001 From: rathnor Date: Sun, 4 May 2003 13:04:31 +0000 Subject: fix segfault on restart/close when icons exist --- src/Screen.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 89ef2a7..7677ec9 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.142 2003/04/28 22:43:26 fluxgen Exp $ +// $Id: Screen.cc,v 1.143 2003/05/04 13:04:31 rathnor Exp $ #include "Screen.hh" @@ -959,10 +959,10 @@ void BScreen::removeIcon(FluxboxWindow *w) { } void BScreen::removeWindow(FluxboxWindow *win) { - Workspaces::iterator it = workspacesList.begin(); - Workspaces::iterator it_end = workspacesList.end(); - for (; it != it_end; ++it) - (*it)->removeWindow(win); + if (win->isIconic()) + removeIcon(win); + else + getWorkspace(win->getWorkspaceNumber())->removeWindow(win); } @@ -2276,10 +2276,7 @@ void BScreen::shutdown() { workspacesList.end(), mem_fun(&Workspace::shutdown)); - while (!iconList.empty()) { - iconList.back()->restore(true); // restore with remap - delete iconList.back(); // the window removes it self from iconlist - } + #ifdef SLIT -- cgit v0.11.2