diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-24 08:33:35 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-24 08:33:35 +0000 |
| commit | 28594da6de001f1d8b6b975286032302db3a6491 (patch) | |
| tree | dfbd92e585fbe52456061b79065814b9405b51b3 /util/epist/epist.cc | |
| parent | 3792d283331087b1ae92419f847efaa7f879e440 (diff) | |
epist + multihead == <drool>
added next/prevWindowOnAllScreens
added next/prevScreen
Diffstat (limited to 'util/epist/epist.cc')
| -rw-r--r-- | util/epist/epist.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/util/epist/epist.cc b/util/epist/epist.cc index 30b2f47d..f3084e8c 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -69,10 +69,14 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) _xatom = new XAtom(getXDisplay()); + _active = _clients.end(); + for (unsigned int i = 0; i < getNumberOfScreens(); ++i) { screen *s = new screen(this, i); - if (s->managed()) + if (s->managed()) { _screens.push_back(s); + s->updateEverything(); + } } if (_screens.empty()) { cout << "No compatible window manager found on any screens. Aborting.\n"; @@ -198,6 +202,18 @@ XWindow *epist::findWindow(Window window) const { return 0; } + +void epist::cycleScreen(int current, bool forward) const { + int dest = current + (forward ? 1 : -1); + + if (dest < 0) dest = (signed)_screens.size() - 1; + else if (dest >= (signed)_screens.size()) dest = 0; + + const XWindow *target = _screens[dest]->lastActiveWindow(); + if (target) target->focus(); +} + + void epist::addAction(Action::ActionType act, unsigned int modifiers, string key, int number) { _actions.push_back(Action(act, XKeysymToKeycode(getXDisplay(), |
