all repos — openbox @ c6234a4de0263828e89e3b8812cbb93e72d13ffc

openbox fork - make it a bit more like ryudo

add iconifying
Dana Jansens danakj@orodu.net
commit

c6234a4de0263828e89e3b8812cbb93e72d13ffc

parent

b94699afc339c469534521c44470aa6d19e5b4cc

M util/epist/actions.hhutil/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.ccutil/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.ccutil/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.hhutil/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.ccutil/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.hhutil/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; }