From b3adc6254b7d1923d29cea05b508012ba61fa496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Thu, 4 Apr 2013 22:59:44 +0200 Subject: [PATCH] snap maximized windows to border BUG: 317845 REVIEW: 109864 --- geometry.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 9f99d485f5..72884296ef 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -427,13 +427,13 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted, // snap to titlebar Position titlePos = c->titlebarPosition(); - if (titlePos == PositionLeft) + if (titlePos == PositionLeft || (c->maximizeMode() & MaximizeHorizontal)) padding[0] = 0; - if (titlePos == PositionRight) + if (titlePos == PositionRight || (c->maximizeMode() & MaximizeHorizontal)) padding[1] = 0; - if (titlePos == PositionTop) + if (titlePos == PositionTop || (c->maximizeMode() & MaximizeVertical)) padding[2] = 0; - if (titlePos == PositionBottom) + if (titlePos == PositionBottom || (c->maximizeMode() & MaximizeVertical)) padding[3] = 0; if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snap)) {