]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
ignore the new generated manpage
[chaz/openbox] / util / epist / screen.cc
index d767c268136460746db411b83b4bee3e6fc14040..8163107391de84ea015d1bbf3597096054342b20 100644 (file)
@@ -475,6 +475,7 @@ void screen::cycleWindow(const bool forward, const int increment,
                          const bool allscreens, const bool alldesktops,
                          const bool sameclass, const string &cn) const {
   assert(_managed);
+  assert(increment > 0);
 
   if (_clients.empty()) return;
 
@@ -486,7 +487,7 @@ void screen::cycleWindow(const bool forward, const int increment,
     begin = _clients.begin(),
     end = _clients.end();
 
-  const XWindow *t;
+  const XWindow *t = 0;
   
   for (int x = 0; x < increment; ++x) {
     while (1) {
@@ -499,8 +500,7 @@ void screen::cycleWindow(const bool forward, const int increment,
       } else {
         if (target == begin)
           target = end;
-        for (int x = 0; x < increment; ++x)
-          --target;
+        --target;
       }
 
       // must be no window to focus
@@ -532,8 +532,10 @@ void screen::cycleWindow(const bool forward, const int increment,
 }
 
 
-void screen::cycleWorkspace(const bool forward, const int increment, const bool loop) const {
+void screen::cycleWorkspace(const bool forward, const int increment,
+                            const bool loop) const {
   assert(_managed);
+  assert(increment > 0);
 
   unsigned int destination = _active_desktop;
 
This page took 0.024774 seconds and 4 git commands to generate.