Bug 460277 - Window appears before animation plays
Summary: Window appears before animation plays
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: git-stable-Plasma/5.26
Platform: Neon Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-10-12 06:31 UTC by code
Modified: 2022-10-24 08:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.1


Attachments
video of the issue (1.91 MB, video/mp4)
2022-10-22 15:27 UTC, Sebastian Kuźlak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description code 2022-10-12 06:31:59 UTC
SUMMARY

This has been first reported here: https://github.com/Schneegans/Burn-My-Windows/issues/223

The Burn-My-Windows effects from the KDE store () do not show or hide a window correctly on KWin 5.26 (it used to work on 5.25). Opening a new Window has the Window appear, play the animation and then redraw the window. Closing a Window has the the animation play over the Window before the Window disappears.

As nothing changed in the effect's code, I suspect that this is somehow a regression in KWin.

STEPS TO REPRODUCE
1. Install an effect such as this one: https://store.kde.org/p/1884307
2. Open Window
3. Observe Window appears, animation plays over it, Window flickers and then is redrawn
4. Close Window
5. Animation plays over Window, only then does it disappear instead of as the animation plays

OBSERVED RESULT

The window is show before the opening-animation plays and stays fully visible during the close-animation.  

EXPECTED RESULT

The window should be shown gradually during the open-animation and gradually hidden during the close-animation.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION

This has also been observed on Fedora Rawhide and KWin 5.25.90.
Comment 1 Sebastian Kuźlak 2022-10-12 10:02:00 UTC
confirm
Comment 2 Bug Janitor Service 2022-10-12 10:30:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3040
Comment 3 David Edmundson 2022-10-12 11:28:29 UTC
Git commit 36440a9d91915a8885a8bbcc1b2dcf39428f07ed by David Edmundson.
Committed on 12/10/2022 at 11:28.
Pushed by davidedmundson into branch 'master'.

Fix scripted shader effect animations

AnimationEffect inherits from CrossfadeEffect as it may do a crossfade,
but it also has to perform non-crossfading activities with a custom
shader.

For crossfades we want to draw the old and new window, but this isn't
needed where the crossFadeProgress remains at 0.

M  +1    -1    src/libkwineffects/kwineffects.cpp
M  +10   -5    src/libkwineffects/kwinoffscreeneffect.cpp

https://invent.kde.org/plasma/kwin/commit/36440a9d91915a8885a8bbcc1b2dcf39428f07ed
Comment 4 David Edmundson 2022-10-12 11:36:41 UTC
Sorry about breaking your effects. Fortunately it will be fixed in 5.26.1 which will be out within a week
Comment 5 code 2022-10-12 11:39:56 UTC
In fact, I have to apologize for not reporting this earlier, as it was reported to me already more than two weeks ago... Anyways, thank you for the extremely fast fix!
Comment 6 Nate Graham 2022-10-12 17:36:24 UTC
Git commit 8599deba2eedab7181339c2555334c7dbab9a2ba by Nate Graham, on behalf of David Edmundson.
Committed on 12/10/2022 at 17:36.
Pushed by ngraham into branch 'Plasma/5.26'.

Fix scripted shader effect animations

AnimationEffect inherits from CrossfadeEffect as it may do a crossfade,
but it also has to perform non-crossfading activities with a custom
shader.

For crossfades we want to draw the old and new window, but this isn't
needed where the crossFadeProgress remains at 0.


(cherry picked from commit 36440a9d91915a8885a8bbcc1b2dcf39428f07ed)

M  +1    -1    src/libkwineffects/kwineffects.cpp
M  +10   -5    src/libkwineffects/kwinoffscreeneffect.cpp

https://invent.kde.org/plasma/kwin/commit/8599deba2eedab7181339c2555334c7dbab9a2ba
Comment 7 Sebastian Kuźlak 2022-10-22 15:27:44 UTC
Created attachment 153118 [details]
video of the issue
Comment 8 Sebastian Kuźlak 2022-10-22 15:28:46 UTC
(In reply to Sebastian Kuźlak from comment #7)
> Created attachment 153118 [details]
> video of the issue

I think there is a still issue. Different but related to the fix.
Comment 9 Sebastian Kuźlak 2022-10-22 15:31:06 UTC
Sorry, it seems i lost my ability to think correctly. Can't edit or... Nvm. Issue is that animation plays while window contents are empty (seen in the video). Sorry for the spam.
Comment 10 Vlad Zahorodnii 2022-10-24 08:27:35 UTC
Unrelated issue.