]> Dogcows Code - chaz/openbox/commitdiff
let clients be remaximized to adjust to new surroundings/struts
authorDana Jansens <danakj@orodu.net>
Sat, 1 Feb 2003 13:04:22 +0000 (13:04 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 1 Feb 2003 13:04:22 +0000 (13:04 +0000)
src/client.cc
src/client.hh

index e0d68db406749b245a435439429a3e25e40ffd7d..f60a8da62e33882c38631cd62f3d9751ae5f6e0f 100644 (file)
@@ -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..
index 7539a7c8ed4512d2b13340e4004ce890a64ca99a..02c12d4342ff02b66ed007708ffb77da3c0a6cf9 100644 (file)
@@ -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
This page took 0.024864 seconds and 4 git commands to generate.