all repos — openbox @ 8a7bff7a05b20b2f330c4d4e5f768a9bacb44ff9

openbox fork - make it a bit more like ryudo

let clients be remaximized to adjust to new surroundings/struts
Dana Jansens danakj@orodu.net
commit

8a7bff7a05b20b2f330c4d4e5f768a9bacb44ff9

parent

83bfa01b0bf361d4a2354e5ef0f48ed759e0eab3

2 files changed, 23 insertions(+), 0 deletions(-)

jump to
M src/client.ccsrc/client.cc

@@ -1284,6 +1284,22 @@ otk::Property::atoms.atom, actions, num);

} +void Client::remaximize() +{ + int dir; + if (_max_horz && _max_vert) + dir = 0; + else if (_max_horz) + dir = 1; + else if (_max_vert) + dir = 2; + else + return; // not maximized + _max_horz = _max_vert = false; + maximize(true, dir, false); +} + + void Client::applyStartupState() { // these are in a carefully crafted order..
M src/client.hhsrc/client.hh

@@ -633,6 +633,13 @@ @param h The height component of the new size for the client.

*/ void resize(Corner anchor, int w, int h); + //! Reapplies the maximized state to the window + /*! + Use this to make the window readjust its maximized size to new + surroundings (struts, etc). + */ + void remaximize(); + //! Choose a mask of decorations to not display on the client /*! Pass a value of 0 to the function to turn all decorations back on. Note