xdgshellwindow: Always update window position and size along all axes when fully miximizing window
BUG: 482086
This commit is contained in:
parent
7078f4e3af
commit
40b8637ab8
1 changed files with 12 additions and 13 deletions
|
@ -1519,15 +1519,14 @@ void XdgToplevelWindow::maximize(MaximizeMode mode)
|
||||||
setGeometryRestore(savedGeometry);
|
setGeometryRestore(savedGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
const MaximizeMode delta = m_requestedMaximizeMode ^ oldMode;
|
|
||||||
QRectF geometry = oldGeometry;
|
QRectF geometry = oldGeometry;
|
||||||
|
|
||||||
if (delta & MaximizeHorizontal) {
|
if (m_requestedMaximizeMode & MaximizeHorizontal) {
|
||||||
if (m_requestedMaximizeMode & MaximizeHorizontal) {
|
// Stretch the window vertically to fit the size of the maximize area.
|
||||||
// Stretch the window vertically to fit the size of the maximize area.
|
geometry.setX(clientArea.x());
|
||||||
geometry.setX(clientArea.x());
|
geometry.setWidth(clientArea.width());
|
||||||
geometry.setWidth(clientArea.width());
|
} else if (oldMode & MaximizeHorizontal) {
|
||||||
} else if (geometryRestore().isValid()) {
|
if (geometryRestore().isValid()) {
|
||||||
// The window is no longer maximized horizontally and the saved geometry is valid.
|
// The window is no longer maximized horizontally and the saved geometry is valid.
|
||||||
geometry.setX(geometryRestore().x());
|
geometry.setX(geometryRestore().x());
|
||||||
geometry.setWidth(geometryRestore().width());
|
geometry.setWidth(geometryRestore().width());
|
||||||
|
@ -1540,12 +1539,12 @@ void XdgToplevelWindow::maximize(MaximizeMode mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delta & MaximizeVertical) {
|
if (m_requestedMaximizeMode & MaximizeVertical) {
|
||||||
if (m_requestedMaximizeMode & MaximizeVertical) {
|
// Stretch the window horizontally to fit the size of the maximize area.
|
||||||
// Stretch the window horizontally to fit the size of the maximize area.
|
geometry.setY(clientArea.y());
|
||||||
geometry.setY(clientArea.y());
|
geometry.setHeight(clientArea.height());
|
||||||
geometry.setHeight(clientArea.height());
|
} else if (oldMode & MaximizeVertical) {
|
||||||
} else if (geometryRestore().isValid()) {
|
if (geometryRestore().isValid()) {
|
||||||
// The window is no longer maximized vertically and the saved geometry is valid.
|
// The window is no longer maximized vertically and the saved geometry is valid.
|
||||||
geometry.setY(geometryRestore().y());
|
geometry.setY(geometryRestore().y());
|
||||||
geometry.setHeight(geometryRestore().height());
|
geometry.setHeight(geometryRestore().height());
|
||||||
|
|
Loading…
Reference in a new issue