fix bug with infinate loop when cycling backwards on an empty workspace
authorDana Jansens <danakj@orodu.net>
Sun, 8 Dec 2002 04:57:08 +0000 (04:57 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 8 Dec 2002 04:57:08 +0000 (04:57 +0000)
util/epist/screen.cc

index ca029652efacfd330bd1b29b08b00c84adf7c2ec..63b9578d2d94fd3e3f90c77fd13f7e8b8e9bf15c 100644 (file)
@@ -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