X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fepist.cc;h=4397cc7be1df678e0650be2f49accb3ebcce9e08;hb=7d153b742bcdf4056ac5e70f8d039f13c12319b7;hp=6e954aec9a787fd0ae60d0a1347a852d144fd4ca;hpb=a0e50e15b507f1f8752bd7858c9e758265a34fc4;p=chaz%2Fopenbox diff --git a/util/epist/epist.cc b/util/epist/epist.cc index 6e954aec..4397cc7b 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -76,14 +76,18 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) ::exit(1); } - _actions.push_back(Action(Action::nextDesktop, + _actions.push_back(Action(Action::nextWorkspace, XKeysymToKeycode(getXDisplay(), XStringToKeysym("Tab")), Mod1Mask)); - _actions.push_back(Action(Action::prevDesktop, + _actions.push_back(Action(Action::prevWorkspace, XKeysymToKeycode(getXDisplay(), XStringToKeysym("Tab")), ControlMask)); + _actions.push_back(Action(Action::shade, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("F5")), + Mod1Mask)); activateGrabs(); } @@ -92,24 +96,21 @@ epist::~epist() { delete _xatom; } -// XGrabKey(_epist->getXDisplay(), XKeysymToKeycode(_epist->getXDisplay(), -// XStringToKeysym("F5")), -// Mod1Mask, _root, True, GrabModeAsync, GrabModeAsync); - void epist::activateGrabs() { ScreenList::const_iterator scrit, scrend = _screens.end(); for (scrit = _screens.begin(); scrit != scrend; ++scrit) { - ActionList::const_iterator end = _actions.end(); + ActionList::const_iterator ait, end = _actions.end(); - for(ActionList::const_iterator ait = _actions.begin(); - ait != end; ++ait) { + for(ait = _actions.begin(); ait != end; ++ait) { XGrabKey(getXDisplay(), ait->keycode(), ait->modifierMask(), - (*scrit)->rootWindow(), True, GrabModeAsync, GrabModeAsync); + (*scrit)->rootWindow(), False, GrabModeAsync, GrabModeAsync); } } } + + bool epist::handleSignal(int sig) { switch (sig) { case SIGHUP: @@ -137,6 +138,7 @@ void epist::process_event(XEvent *e) { else root = e->xany.window; + cout << "event\n"; ScreenList::const_iterator it, end = _screens.end(); for (it = _screens.begin(); it != end; ++it) { if ((*it)->rootWindow() == root) {