From 8a7bff7a05b20b2f330c4d4e5f768a9bacb44ff9 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 1 Feb 2003 13:04:22 +0000 Subject: [PATCH] let clients be remaximized to adjust to new surroundings/struts --- src/client.cc | 16 ++++++++++++++++ src/client.hh | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/src/client.cc b/src/client.cc index e0d68db4..f60a8da6 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1284,6 +1284,22 @@ void Client::changeAllowedActions(void) } +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.. diff --git a/src/client.hh b/src/client.hh index 7539a7c8..02c12d43 100644 --- a/src/client.hh +++ b/src/client.hh @@ -633,6 +633,13 @@ BB @param window The window id that the Client class should handle */ 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 -- 2.44.0