snap max'd windows to maximize, not movement area

Because that's where it's placed. Notable esp. when there're panels on opposing sides.
Since snapping keeps max'd windows in position, it should preferably keep it in the proper position ;-)

REVIEW: 112322
This commit is contained in:
Thomas Lübking 2013-08-27 23:46:55 +02:00
parent 8a8ccc2afa
commit ef351070e7

View file

@ -385,7 +385,7 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
QRect maxRect;
int guideMaximized = MaximizeRestore;
if (c->maximizeMode() != MaximizeRestore) {
maxRect = clientArea(MovementArea, pos + c->rect().center(), c->desktop());
maxRect = clientArea(MaximizeArea, pos + c->rect().center(), c->desktop());
QRect geo = c->geometry();
if (c->maximizeMode() & MaximizeHorizontal && (geo.x() == maxRect.left() || geo.right() == maxRect.right())) {
guideMaximized |= MaximizeHorizontal;