From ae769906de485be2ef66e7bd44affc48659d4074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 23 Apr 2012 12:13:31 +0200 Subject: [PATCH] fix quick unmaximization position CCBUG: 298646 REVIEW: 104702 --- geometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 52dc1b9bd5..a79e940abe 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2258,8 +2258,8 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust) QSize adjSize = adjustedSize(clientArea.size(), SizemodeMax); QRect r = QRect(clientArea.topLeft(), adjSize); if (r.size() != clientArea.size()) { // to avoid off-by-one errors... - if (isElectricBorderMaximizing()) - r.moveLeft(qMax(clientArea.x(), QCursor::pos().x() - r.width()/2)); + if (isElectricBorderMaximizing() && r.width() < clientArea.width()) + r.moveLeft(QCursor::pos().x() - r.width()/2); else r.moveCenter(clientArea.center()); }