Bug 465157

Summary: kwin4_effect_maximize: cannot animate when a window maximizes for the first time
Product: [Plasma] kwin Reporter: kde-yyds
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR Keywords: regression
Version First Reported In: 5.26.90   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.27
Sentry Crash Report:
Attachments: maximize

Description kde-yyds 2023-02-02 06:13:26 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. upgrade to plasma 5.27 beta
2. open a window
3. maximize it

OBSERVED RESULT
only crossfade for the first time

EXPECTED RESULT
full maximize effect for the first time

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.26.9
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 kde-yyds 2023-02-02 06:21:42 UTC
Created attachment 155872 [details]
maximize
Comment 2 kde-yyds 2023-02-02 06:28:21 UTC
By the way, fullscreen effect has this bug too.
Comment 3 Vlad Zahorodnii 2023-02-02 17:11:16 UTC
Is it X11 or Wayland?

Does it happen for every new window?

Does it happen with "stock" plasma, i.e. without customizations?
Comment 4 kde-yyds 2023-02-03 00:39:05 UTC
(In reply to Vlad Zahorodnii from comment #3)
> Is it X11 or Wayland?
> 
> Does it happen for every new window?
> 
> Does it happen with "stock" plasma, i.e. without customizations?

It only happens on X11, every time.
I created a new user, and it still happens.
Comment 5 Bug Janitor Service 2023-02-03 08:40:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3533
Comment 6 Vlad Zahorodnii 2023-02-03 14:01:13 UTC
Git commit 2babccda048b61305ade9046658491cfd5311636 by Vlad Zahorodnii.
Committed on 03/02/2023 at 08:33.
Pushed by vladz into branch 'master'.

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.

M  +2    -1    src/x11window.cpp

https://invent.kde.org/plasma/kwin/commit/2babccda048b61305ade9046658491cfd5311636
Comment 7 Vlad Zahorodnii 2023-02-03 14:08:34 UTC
Git commit a6a22271683308a193c1e886b35958038a91cada by Vlad Zahorodnii.
Committed on 03/02/2023 at 14:08.
Pushed by vladz into branch 'cherry-pick-2babccda'.

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.


(cherry picked from commit 2babccda048b61305ade9046658491cfd5311636)

M  +2    -1    src/x11window.cpp

https://invent.kde.org/plasma/kwin/commit/a6a22271683308a193c1e886b35958038a91cada
Comment 8 kde-yyds 2023-08-29 09:46:43 UTC
also, the same issue for fullscreen effect.