x11: Fix maximize animation

Window::maximize() used to be split in two halves:

- generic Window::setMaximized() and Window::maximize()
- protocol-specific Window::changeMaximize()

Window::changeMaximize() used to block all geometry updates and
Window::maximize() emit "maximize mode changed" signals. With that,
frameGeometryChanged came always before clientMaximizedStateChanged.

After merging Window::changeMaximize() and Window::maximize(), the order
of the signals has been reversed because of RAII. Unblock geometry
updates explicitly to preserve the old behavior.

BUG: 465157
This commit is contained in:
Vlad Zahorodnii 2023-02-03 10:33:42 +02:00
parent cf02612710
commit 2babccda04

View file

@ -4336,7 +4336,7 @@ void X11Window::maximize(MaximizeMode mode)
return;
}
GeometryUpdatesBlocker blocker(this);
blockGeometryUpdates(true);
// maximing one way and unmaximizing the other way shouldn't happen,
// so restore first and then maximize the other way
@ -4549,6 +4549,7 @@ void X11Window::maximize(MaximizeMode mode)
break;
}
blockGeometryUpdates(false);
updateAllowedActions();
updateWindowRules(Rules::MaximizeVert | Rules::MaximizeHoriz | Rules::Position | Rules::Size);
Q_EMIT quickTileModeChanged();