X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fepist.cc;h=bfa7989ce89462588ef83cfa02fc6412480c1cd2;hb=e8f387ea481470dd69257f0e7d4644ab1270b64a;hp=6d122807c06d642dc06acd73ed5965955c43fd45;hpb=3fd35d37e692edc703291a594de1928439de82eb;p=chaz%2Fopenbox diff --git a/util/epist/epist.cc b/util/epist/epist.cc index 6d122807..bfa7989c 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -58,7 +58,7 @@ using std::string; epist::epist(char **argv, char *dpy_name, char *rc_file) : BaseDisplay(argv[0], dpy_name) { - + _argv = argv; if (rc_file) @@ -227,8 +227,7 @@ void epist::activateGrabs() { ActionList::const_iterator ait, end = _actions.end(); for(ait = _actions.begin(); ait != end; ++ait) { - XGrabKey(getXDisplay(), ait->keycode(), ait->modifierMask(), - (*scrit)->rootWindow(), False, GrabModeAsync, GrabModeAsync); + (*scrit)->grabKey(ait->keycode(), ait->modifierMask()); } } } @@ -254,16 +253,9 @@ bool epist::handleSignal(int sig) { void epist::process_event(XEvent *e) { - Window root; - - if (e->xany.type == KeyPress) - root = e->xkey.root; - else - root = e->xany.window; - ScreenList::const_iterator it, end = _screens.end(); for (it = _screens.begin(); it != end; ++it) { - if ((*it)->rootWindow() == root) { + if ((*it)->rootWindow() == e->xany.window) { (*it)->processEvent(*e); return; }