From: Dana Jansens Date: Sun, 8 Dec 2002 04:57:08 +0000 (+0000) Subject: fix bug with infinate loop when cycling backwards on an empty workspace X-Git-Tag: openbox-2_2_2^2~1 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=5a030d5ec1750f34d1e798bf347ebf719d24a106;p=dana%2Fopenbox.git fix bug with infinate loop when cycling backwards on an empty workspace --- diff --git a/util/epist/screen.cc b/util/epist/screen.cc index ca029652..63b9578d 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -589,7 +589,6 @@ void screen::execCommand(const string &cmd) const { } } - void screen::cycleWindow(unsigned int state, const bool forward, const int increment, const bool allscreens, const bool alldesktops, const bool sameclass, @@ -613,15 +612,15 @@ void screen::cycleWindow(unsigned int state, const bool forward, for (int x = 0; x < increment; ++x) { while (1) { if (forward) { - if (target == end) { + if (target == end) target = begin; - } else { + else ++target; - } } else { if (target == begin) target = end; - --target; + else + --target; } // must be no window to focus