all repos — fluxbox @ f3eb92dd39c876544a25e327f563b1aa19bab804

custom fork of the fluxbox windowmanager

fixed bug in shutdown
fluxgen fluxgen
commit

f3eb92dd39c876544a25e327f563b1aa19bab804

parent

31f552fa3499886658aded42987c6aeedff0c8fe

1 files changed, 8 insertions(+), 6 deletions(-)

jump to
M src/Workspace.ccsrc/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) } + }