snap maximized windows to border

BUG: 317845
REVIEW: 109864
This commit is contained in:
Thomas Lübking 2013-04-04 22:59:44 +02:00
parent 40e1d36f5b
commit b3adc6254b

View file

@ -427,13 +427,13 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
// snap to titlebar // snap to titlebar
Position titlePos = c->titlebarPosition(); Position titlePos = c->titlebarPosition();
if (titlePos == PositionLeft) if (titlePos == PositionLeft || (c->maximizeMode() & MaximizeHorizontal))
padding[0] = 0; padding[0] = 0;
if (titlePos == PositionRight) if (titlePos == PositionRight || (c->maximizeMode() & MaximizeHorizontal))
padding[1] = 0; padding[1] = 0;
if (titlePos == PositionTop) if (titlePos == PositionTop || (c->maximizeMode() & MaximizeVertical))
padding[2] = 0; padding[2] = 0;
if (titlePos == PositionBottom) if (titlePos == PositionBottom || (c->maximizeMode() & MaximizeVertical))
padding[3] = 0; padding[3] = 0;
if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snap)) { if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snap)) {