summaryrefslogtreecommitdiff
path: root/app/cwm/client.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:23:31 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:23:31 +0000
commitf2e294b1509d817c713729da3551a7e749500fa9 (patch)
tree7c5d2b0a864442c1527a5e568a95e9eb965eb3c1 /app/cwm/client.c
parent7bd488e7c78e06de5f445f4f2669397298dbfb9c (diff)
we already have ymax, so use it instead of asking X for it again.
ok oga@
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r--app/cwm/client.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index c54a7e695..f298439eb 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.
*
- * $Id: client.c,v 1.34 2008/07/11 14:21:28 okan Exp $
+ * $Id: client.c,v 1.35 2008/07/11 14:23:30 okan Exp $
*/
#include "headers.h"
@@ -699,19 +699,15 @@ client_placecalc(struct client_ctx *cc)
void
client_vertmaximize(struct client_ctx *cc)
{
+ struct screen_ctx *sc = CCTOSC(cc);
+
if (cc->flags & CLIENT_VMAXIMIZED) {
cc->geom = cc->savegeom;
} else {
- struct screen_ctx *sc = CCTOSC(cc);
- int display_height;
-
- display_height = DisplayHeight(X_Dpy, sc->which) -
- cc->bwidth * 2;
-
if (!(cc->flags & CLIENT_MAXIMIZED))
cc->savegeom = cc->geom;
cc->geom.y = cc->bwidth + Conf.gap_top;
- cc->geom.height = display_height -
+ cc->geom.height = (sc->ymax - cc->bwidth * 2) -
(Conf.gap_top + Conf.gap_bottom);
cc->flags |= CLIENT_DOVMAXIMIZE;
}