]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
basename() returns a string sometimes.. go shaleh. but this makes it work both ways.
[chaz/openbox] / util / epist / screen.cc
index 7ac5780b1c59f4ce62543e029fee4e6496d7608f..e7ebd64cf1d1afb06abd79d40c69b74b6c49a88e 100644 (file)
@@ -444,8 +444,7 @@ void screen::updateActiveWindow() {
     }
   }
   _active = it;
-  if (it != end)
-    _last_active = it;
+  _last_active = it;
 
   /*  cout << "Active window is now: ";
       if (_active == _clients.end()) cout << "None\n";
@@ -475,6 +474,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 +486,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) {
@@ -531,8 +531,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.023929 seconds and 4 git commands to generate.