X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=util%2Fepist%2Fscreen.cc;h=7dfca51fccfe9ffe3efed99ce71004150a416df4;hb=0adf54b0ca8f723dd25645d414b48a9a74e115d6;hp=2a4d5a7078fc06a19da7cdb50d1c8c1a2fb9c240;hpb=8e38989ee8533c364a7f407bdafef351d9f1823e;p=chaz%2Fopenbox diff --git a/util/epist/screen.cc b/util/epist/screen.cc index 2a4d5a70..7dfca51f 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -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"; @@ -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));