x11window: partially revert 3a28c02f

In some cases it can cause rather than fix problems with maximization
This commit is contained in:
Xaver Hugl 2022-10-26 12:37:36 +02:00
parent f6d14f1b44
commit 580396e377

View file

@ -4487,23 +4487,23 @@ void X11Window::maximize(MaximizeMode mode)
if (closeHeight) {
bool tryBottom = titlePos == Qt::BottomEdge;
if ((overHeight && titlePos == Qt::TopEdge) || screenArea.top() == clientArea.top()) {
r.moveTop(clientArea.top());
r.setTop(clientArea.top());
} else {
tryBottom = true;
}
if (tryBottom && (overHeight || screenArea.bottom() == clientArea.bottom())) {
r.moveBottom(clientArea.bottom());
r.setBottom(clientArea.bottom());
}
}
if (closeWidth) {
bool tryLeft = titlePos == Qt::LeftEdge;
if ((overWidth && titlePos == Qt::RightEdge) || screenArea.right() == clientArea.right()) {
r.moveRight(clientArea.right());
r.setRight(clientArea.right());
} else {
tryLeft = true;
}
if (tryLeft && (overWidth || screenArea.left() == clientArea.left())) {
r.moveLeft(clientArea.left());
r.setLeft(clientArea.left());
}
}
}