diff options
author | okan | 2012-09-09 19:47:47 +0000 |
---|---|---|
committer | okan | 2012-09-09 19:47:47 +0000 |
commit | 3f39c1ade76f893d54e73fe273041ff90c39d7de (patch) | |
tree | 5979019c722abe491734c43e8bc1a94e91e2fb83 /client.c | |
parent | 27c19dc76dec9d1f5bc83b63aac5278b5c5e24c2 (diff) | |
download | cwm-3f39c1ade76f893d54e73fe273041ff90c39d7de.tar.gz |
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 'client.c')
-rw-r--r-- | client.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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, |