add 'toggleomnipresent' action
Dana Jansens danakj@orodu.net
5 files changed,
19 insertions(+),
0 deletions(-)
M
util/epist/actions.hh
→
util/epist/actions.hh
@@ -40,6 +40,7 @@ raise, //done
lower, //done close, //done toggleshade, //done + toggleomnipresent, //done moveWindowUp, moveWindowDown, moveWindowLeft,
M
util/epist/epist.cc
→
util/epist/epist.cc
@@ -120,6 +120,10 @@ _actions.push_back(Action(Action::iconify,
XKeysymToKeycode(getXDisplay(), XStringToKeysym("I")), Mod1Mask | ControlMask)); + _actions.push_back(Action(Action::toggleomnipresent, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("O")), + Mod1Mask | ControlMask)); activateGrabs(); }
M
util/epist/screen.cc
→
util/epist/screen.cc
@@ -221,6 +221,13 @@ case Action::lower:
window->lower(); return; + case Action::toggleomnipresent: + if (window->desktop() == 0xffffffff) + window->sendTo(_active_desktop); + else + window->sendTo(0xffffffff); + return; + case Action::toggleshade: window->shade(! window->shaded()); return;
M
util/epist/window.cc
→
util/epist/window.cc
@@ -177,3 +177,9 @@ // this will also unshade the window..
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window, _window); } + + +void XWindow::sendTo(unsigned int dest) const { + _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_wm_desktop, + _window, dest); +}
M
util/epist/window.hh
→
util/epist/window.hh
@@ -86,6 +86,7 @@ void raise() const;
void lower() const; void iconify() const; void focus() const; + void sendTo(unsigned int dest) const; bool operator == (const XWindow &w) const { return w._window == _window; } bool operator == (const Window &w) const { return w == _window; }