summaryrefslogtreecommitdiff
path: root/util/epist
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-20 10:11:10 +0000
committerDana Jansens <danakj@orodu.net>2002-07-20 10:11:10 +0000
commit5cb52056efcac25dd4b0d3035f860e5b1870bca1 (patch)
tree4158163ea7246e557c1657f2803cbf2b9338632b /util/epist
parente01cab39e56e5cc9e0dc436983842c050dab1bac (diff)
add 'toggleomnipresent' action
Diffstat (limited to 'util/epist')
-rw-r--r--util/epist/actions.hh1
-rw-r--r--util/epist/epist.cc4
-rw-r--r--util/epist/screen.cc7
-rw-r--r--util/epist/window.cc6
-rw-r--r--util/epist/window.hh1
5 files changed, 19 insertions, 0 deletions
diff --git a/util/epist/actions.hh b/util/epist/actions.hh
index a441fb41..22b11370 100644
--- a/util/epist/actions.hh
+++ b/util/epist/actions.hh
@@ -40,6 +40,7 @@ public:
lower, //done
close, //done
toggleshade, //done
+ toggleomnipresent, //done
moveWindowUp,
moveWindowDown,
moveWindowLeft,
diff --git a/util/epist/epist.cc b/util/epist/epist.cc
index 7ac2daf5..bb33b308 100644
--- a/util/epist/epist.cc
+++ b/util/epist/epist.cc
@@ -120,6 +120,10 @@ epist::epist(char **argv, char *dpy_name, char *rc_file)
XKeysymToKeycode(getXDisplay(),
XStringToKeysym("I")),
Mod1Mask | ControlMask));
+ _actions.push_back(Action(Action::toggleomnipresent,
+ XKeysymToKeycode(getXDisplay(),
+ XStringToKeysym("O")),
+ Mod1Mask | ControlMask));
activateGrabs();
}
diff --git a/util/epist/screen.cc b/util/epist/screen.cc
index d6ce9bbb..ec73aa82 100644
--- a/util/epist/screen.cc
+++ b/util/epist/screen.cc
@@ -221,6 +221,13 @@ void screen::handleKeypress(const XEvent &e) {
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;
diff --git a/util/epist/window.cc b/util/epist/window.cc
index 376446a4..cbd60f37 100644
--- a/util/epist/window.cc
+++ b/util/epist/window.cc
@@ -177,3 +177,9 @@ void XWindow::focus() const {
_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);
+}
diff --git a/util/epist/window.hh b/util/epist/window.hh
index 44df2135..351ec566 100644
--- a/util/epist/window.hh
+++ b/util/epist/window.hh
@@ -86,6 +86,7 @@ public:
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; }