diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-20 08:06:54 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-20 08:06:54 +0000 |
| commit | c517f511000c8ec775f7413527b9e276b7995806 (patch) | |
| tree | d2f5b8661b87b134a0d1f5c74c09527cd6274312 /util/epist/screen.cc | |
| parent | b4411cb1ef1c25a287181b570e974545e1010530 (diff) | |
some cleanups and such.
Diffstat (limited to 'util/epist/screen.cc')
| -rw-r--r-- | util/epist/screen.cc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/util/epist/screen.cc b/util/epist/screen.cc index afe5b8d1..fd65db4c 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -143,28 +143,32 @@ void screen::processEvent(const XEvent &e) { } void screen::handleKeypress(const XEvent &e) { - list<Action>::const_iterator it = _epist->actions().begin(); - list<Action>::const_iterator end = _epist->actions().end(); + ActionList::const_iterator it = _epist->actions().begin(); + ActionList::const_iterator end = _epist->actions().end(); + cout << "key press\n"; for (; it != end; ++it) { if (e.xkey.keycode == it->keycode() && - e.xkey.state == it->modifierMask() ) - { - switch (it->type()) { - case Action::nextWorkspace: - cycleWorkspace(true); - break; - case Action::prevWorkspace: - cycleWorkspace(false); - break; - case Action::changeWorkspace: - changeWorkspace(it->number()); - break; - case Action::shade: - toggleShaded((*_active)->window()); - break; - } + e.xkey.state == it->modifierMask()) { + switch (it->type()) { + case Action::nextWorkspace: + cycleWorkspace(true); + break; + + case Action::prevWorkspace: + cycleWorkspace(false); + break; + + case Action::changeWorkspace: + changeWorkspace(it->number()); + break; + + case Action::shade: + (*_active)->shade(! (*_active)->shaded()); break; } + + break; + } } } @@ -216,7 +220,8 @@ void screen::updateClientList() { if (it == end) { // didn't already exist if (doAddWindow(rootclients[i])) { cout << "Added window: 0x" << hex << rootclients[i] << dec << endl; - _clients.insert(insert_point, new XWindow(_epist, rootclients[i])); + _clients.insert(insert_point, new XWindow(_epist, this, + rootclients[i])); } } } @@ -291,8 +296,3 @@ void screen::cycleWorkspace(const bool forward) const { void screen::changeWorkspace(const int num) const { _xatom->sendClientMessage(_root, XAtom::net_current_desktop, _root, num); } - -void screen::toggleShaded(const Window win) const { - _xatom->sendClientMessage(_root, XAtom::net_wm_state, win, 2, - XAtom::net_wm_state_shaded); -} |
