add iconifying
Dana Jansens danakj@orodu.net
6 files changed,
17 insertions(+),
1 deletions(-)
M
util/epist/actions.hh
→
util/epist/actions.hh
@@ -35,7 +35,7 @@ // xOr: this is crap.
enum ActionType { noaction = 0, execute, - iconify, + iconify, //done raise, //done lower, //done close, //done
M
util/epist/epist.cc
→
util/epist/epist.cc
@@ -108,6 +108,10 @@ _actions.push_back(Action(Action::lower,
XKeysymToKeycode(getXDisplay(), XStringToKeysym("Down")), Mod1Mask)); + _actions.push_back(Action(Action::iconify, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("I")), + Mod1Mask | ControlMask)); activateGrabs(); }
M
util/epist/screen.cc
→
util/epist/screen.cc
@@ -175,6 +175,10 @@ if (_active != _clients.end()) {
XWindow *window = *_active; switch (it->type()) { + case Action::iconify: + window->iconify(); + return; + case Action::close: window->close(); return;
M
util/epist/screen.hh
→
util/epist/screen.hh
@@ -60,6 +60,7 @@ virtual ~screen();
inline Window rootWindow() const { return _root; } inline bool managed() const { return _managed; } + inline int number() const { return _number; } void processEvent(const XEvent &e);
M
util/epist/window.cc
→
util/epist/window.cc
@@ -164,3 +164,9 @@
void XWindow::lower() const { XLowerWindow(_epist->getXDisplay(), _window); } + + +void XWindow::iconify() const { + _xatom->sendClientMessage(_screen->rootWindow(), XAtom::wm_change_state, + _window, IconicState); +}
M
util/epist/window.hh
→
util/epist/window.hh
@@ -84,6 +84,7 @@ void shade(const bool sh) const;
void close() const; void raise() const; void lower() const; + void iconify() const; bool operator == (const XWindow &w) const { return w._window == _window; } bool operator == (const Window &w) const { return w == _window; }