fix quick unmaximization position
CCBUG: 298646 REVIEW: 104702
This commit is contained in:
parent
44b2b1e493
commit
ae769906de
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue