summaryrefslogtreecommitdiff
path: root/app/cwm/client.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-09-09 19:47:48 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-09-09 19:47:48 +0000
commita514e69ee8bb6f7915d6bd8437b003bae29c1d85 (patch)
treed85debd3251b04ea361382b1ea6f23a9908b65ad /app/cwm/client.c
parentc89e19c7bf4c18a149b4ad1e1872a7f426dee283 (diff)
extend client_resize so that it can know when to reset max flags and
bwidth; this allows a client to be resized from a max state, which now gets treated like a non-max'd client. based on a diff that does part of this in a different way from Alexander Polakov.
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r--app/cwm/client.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index 3339f55c5..2276520d5 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.100 2012/07/16 01:53:14 okan Exp $
+ * $OpenBSD: client.c,v 1.101 2012/09/09 19:47:47 okan Exp $
*/
#include <sys/param.h>
@@ -306,7 +306,7 @@ client_maximize(struct client_ctx *cc)
cc->flags |= CLIENT_MAXIMIZED;
resize:
- client_resize(cc);
+ client_resize(cc, 0);
}
void
@@ -355,7 +355,7 @@ client_vertmaximize(struct client_ctx *cc)
cc->flags |= CLIENT_VMAXIMIZED;
resize:
- client_resize(cc);
+ client_resize(cc, 0);
}
void
@@ -404,12 +404,17 @@ client_horizmaximize(struct client_ctx *cc)
cc->flags |= CLIENT_HMAXIMIZED;
resize:
- client_resize(cc);
+ client_resize(cc, 0);
}
void
-client_resize(struct client_ctx *cc)
+client_resize(struct client_ctx *cc, int reset)
{
+ if (reset) {
+ cc->flags &= ~CLIENT_MAXIMIZED;
+ cc->bwidth = Conf.bwidth;
+ }
+
client_draw_border(cc);
XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,