X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fscreen.cc;h=8597e5953d2df2392a7c4aaea8f510cf866b6835;hb=6a8f5f44e123c9ade7964e2051dd0d6a9858961c;hp=72ee34352dea39616dea96de51902664a0ec68fa;hpb=a9dfa0439bd8d4f525d5b41a22a3eb14b94d1200;p=chaz%2Fopenbox diff --git a/util/epist/screen.cc b/util/epist/screen.cc index 72ee3435..8597e595 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -164,11 +164,11 @@ void screen::handleKeypress(const XEvent &e) { return; case Action::nextWindow: - cycleWindow(true, false); + cycleWindow(true); return; case Action::prevWindow: - cycleWindow(false, false); + cycleWindow(false); return; case Action::nextWindowOnAllWorkspaces: @@ -179,6 +179,22 @@ void screen::handleKeypress(const XEvent &e) { cycleWindow(false, true); return; + case Action::nextWindowOfClass: + cycleWindow(true, false, true); + return; + + case Action::prevWindowOfClass: + cycleWindow(false, false, true); + return; + + case Action::nextWindowOfClassOnAllWorkspaces: + cycleWindow(true, true, true); + return; + + case Action::prevWindowOfClassOnAllWorkspaces: + cycleWindow(false, true, true); + return; + case Action::changeWorkspace: changeWorkspace(it->number()); return; @@ -205,6 +221,17 @@ void screen::handleKeypress(const XEvent &e) { window->lower(); return; + case Action::sendTo: + window->sendTo(it->number()); + return; + + case Action::toggleomnipresent: + if (window->desktop() == 0xffffffff) + window->sendTo(_active_desktop); + else + window->sendTo(0xffffffff); + return; + case Action::toggleshade: window->shade(! window->shaded()); return; @@ -332,7 +359,8 @@ void screen::updateActiveWindow() { */ -void screen::cycleWindow(const bool forward, const bool alldesktops) const { +void screen::cycleWindow(const bool forward, const bool alldesktops, + const bool sameclass) const { assert(_managed); if (_clients.empty()) return; @@ -354,7 +382,9 @@ void screen::cycleWindow(const bool forward, const bool alldesktops) const { } } while (target == _clients.end() || (*target)->iconic() || - (! alldesktops && (*target)->desktop() != _active_desktop)); + (! alldesktops && (*target)->desktop() != _active_desktop) || + (sameclass && _active != _clients.end() && + (*target)->appClass() != (*_active)->appClass())); if (target != _clients.end()) (*target)->focus();