]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
better window focusing
[chaz/openbox] / util / epist / screen.cc
index 56f64f0cee662665269a9a5bde374525eee56397..7dfca51fccfe9ffe3efed99ce71004150a416df4 100644 (file)
@@ -444,7 +444,8 @@ void screen::updateActiveWindow() {
     }
   }
   _active = it;
-  _last_active = it;
+  if (it != end)
+    _last_active = it;
 
 /*  cout << "Active window is now: ";
   if (_active == _clients.end()) cout << "None\n";
@@ -453,7 +454,7 @@ void screen::updateActiveWindow() {
 }
 
 
-void screen::execCommand(const std::string &cmd) const {
+void screen::execCommand(const string &cmd) const {
   pid_t pid;
   if ((pid = fork()) == 0) {
     extern char **environ;
@@ -514,7 +515,9 @@ void screen::cycleWindow(const bool forward, const bool allscreens,
       return;
   } while ((*target)->iconic() ||
            (! allscreens && (*target)->getScreen() != this) ||
-           (! alldesktops && (*target)->desktop() != _active_desktop) ||
+           (! alldesktops &&
+            (*target)->desktop() != _active_desktop &&
+            (*target)->desktop() != 0xffffffff) ||
            (sameclass && ! classname.empty() &&
             (*target)->appClass() != classname));
   
This page took 0.022866 seconds and 4 git commands to generate.