From 3f39c1ade76f893d54e73fe273041ff90c39d7de Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 9 Sep 2012 19:47:47 +0000 Subject: 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. --- client.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 3339f55..2276520 100644 --- a/client.c +++ b/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 @@ -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, -- cgit v1.2.3-2-gb3c3