From 2babccda048b61305ade9046658491cfd5311636 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 3 Feb 2023 10:33:42 +0200 Subject: [PATCH] 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 --- src/x11window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/x11window.cpp b/src/x11window.cpp index 74d82f5613..f39d1d585d 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -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();