diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-24 08:44:21 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-24 08:44:21 +0000 |
| commit | 4652af7b28167a9d9f00e4cb387af93d9e246d64 (patch) | |
| tree | 9027bc8dab076c0c77f41ad698540b4901000810 /util | |
| parent | 28594da6de001f1d8b6b975286032302db3a6491 (diff) | |
watch for case where not all screens get managed!
Diffstat (limited to 'util')
| -rw-r--r-- | util/epist/epist.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/util/epist/epist.cc b/util/epist/epist.cc index f3084e8c..55e58b58 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -83,8 +83,8 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) ::exit(1); } - addAction(Action::nextWorkspace, ControlMask, "Tab"); - addAction(Action::prevWorkspace, ControlMask | ShiftMask, "Tab"); + addAction(Action::nextScreen, ControlMask, "Tab"); + addAction(Action::prevScreen, ControlMask | ShiftMask, "Tab"); addAction(Action::nextWindow, Mod1Mask, "Tab"); addAction(Action::prevWindow, Mod1Mask | ShiftMask, "Tab"); addAction(Action::toggleshade, Mod1Mask, "F5"); @@ -204,6 +204,14 @@ XWindow *epist::findWindow(Window window) const { void epist::cycleScreen(int current, bool forward) const { + unsigned int i; + for (i = 0; i < _screens.size(); ++i) + if (_screens[i]->number() == current) { + current = i; + break; + } + assert(i < _screens.size()); // current is for an unmanaged screen + int dest = current + (forward ? 1 : -1); if (dest < 0) dest = (signed)_screens.size() - 1; |
