nextWindowOnAllWorkspaces, //done
prevWindowOnAllWorkspaces, //done
- nextWindowOfClass,
- prevWindowOfClass,
+ nextWindowOfClass, //done
+ prevWindowOfClass, //done
changeWorkspace, //done
nextWorkspace, //done
return;
case Action::nextWindow:
- cycleWindow(true, false);
+ cycleWindow(true);
return;
case Action::prevWindow:
- cycleWindow(false, false);
+ cycleWindow(false);
return;
case Action::nextWindowOnAllWorkspaces:
cycleWindow(false, true);
return;
+ case Action::nextWindowOfClass:
+ cycleWindow(true, false, true);
+ return;
+
+ case Action::prevWindowOfClass:
+ cycleWindow(false, false, true);
+ return;
+
case Action::changeWorkspace:
changeWorkspace(it->number());
return;
*/
-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;
}
} 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();
void handleKeypress(const XEvent &e);
- void cycleWindow(const bool forward, const bool alldesktops) const;
+ void cycleWindow(const bool forward, const bool alldesktops = false,
+ const bool sameclass = false) const;
void cycleWorkspace(const bool forward, const bool loop = true) const;
void changeWorkspace(const int num) const;
void toggleShaded(const Window win) const;