Bug 503964 - Kwin effect "slideback": animation bounces unnecessarily at the end since Plasma 6.3
Summary: Kwin effect "slideback": animation bounces unnecessarily at the end since Pla...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: 6.3.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-05-09 15:22 UTC by Maximilian Böhm
Modified: 2025-06-17 21:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.6
Sentry Crash Report:


Attachments
Plama 6.3 - broken slideback animation (AV1) (3.55 MB, video/x-matroska)
2025-05-09 15:22 UTC, Maximilian Böhm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Böhm 2025-05-09 15:22:00 UTC
Created attachment 181110 [details]
Plama 6.3 - broken slideback animation (AV1)

Kwin effect "slideback": animation broken since Plasma 6.3

Starting with Plasma 6.3, the Slideback effect has been broken. I have a 144 Hz monitor, that’s possibly why it didn’t catch your eyes on retro 60 Hz monitors: After the window sliding effect has ended, the window behind is shaking. This really shouldn’t be the case and wasn’t until Plasma 6.3. You can easily verify it by slowing down global animation speed. I can see this on X.Org and Wayland sessions. It’s not happening on each window switch but with a 2/3 chance.
I will attach a screencast.

KDE Plasma Version: 6.3.5
KDE Frameworks Version:  6.13.0
Qt Version: 6.9.0
Comment 1 Nate Graham 2025-05-09 17:21:13 UTC
Works for me on current git master with a 120Hz screen, on Wayland.

Are you by any chance using an X1 session?
Comment 2 Maximilian Böhm 2025-05-09 21:20:12 UTC
(In reply to Nate Graham from comment #1)
> Works for me on current git master with a 120Hz screen, on Wayland.
> 
> Are you by any chance using an X1 session?

My main session is X11, I cannot set several special key shortcuts under Wayland, cannot use my more robust Atmolight screengrabber, I cannot change trackpad gestures and it’s more unstable in general.

Tried it one again under a different user with a Wayland session: It’s still broken on my machine on recent Arch.
Comment 3 Nate Graham 2025-05-13 16:06:11 UTC
Thanks.
Comment 4 John Kizer 2025-05-16 06:04:08 UTC
Hi - just to check, is the issue you're reporting that the windows that were slid back, behind the newly focused window, jump positions on the last frame of the animation? I want to make sure I'm interpreting the "shaking" and the screencast attachment correctly.

Thanks!
Comment 5 Maximilian Böhm 2025-05-16 21:15:06 UTC
You are correct. In my eyes, it’s like the animation is rendered with an offset and after finishing it, the real window position is revealed as slightly different.
Comment 6 Blazer Silving 2025-05-17 01:30:46 UTC
Hello, I'm afraid this is my fault :) For ages I had been patching my personal kwin build with https://invent.kde.org/plasma/kwin/-/merge_requests/6840 to improve the "inertia" of the effect. When I proposed it for submission, it was accepted oddly quickly! Didn't get much testing then. 

Taking this strength value back down to 0.08 does remove the slight "bounce" at the end of each animation, at the cost of decoupling the animation's duration from the rest of the global animationDuration value. My intention was to sync up the effect's presentation and snappiness with the rest of the Plasma animations, but looks like this wasn't the right way. 

It seems the timing on this effect is broken overall though, as a fresh Wayland session for me shows the effect animating WAY too fast, 3x speed, even without my patch. The problem isn't the inertia, then.
Comment 7 Nate Graham 2025-05-19 21:19:26 UTC
Is that bounce the bug that's being reported here? If so, I can confirm, but I thought it was intentional.
Comment 8 Maximilian Böhm 2025-05-20 13:06:01 UTC
Yes, that’s the bug here. You can compare it with Plasma 6.2, the "bounce" is newly introduced. When you step my screencast through frame by frame you can notice it’s not really a bounce, the slideback animation gets rendered with wrong offset and after finishing, the real window position gets revealed, that’s creating the visual "bounce".

As Blazer commented, the animation speed changed too on 6.3 with his patch, actually I do find it too fast now for an elegant effect but it’s really hard to compare with this visually broken rendering so I decided to first tackle the striking visual bug.
Comment 9 Blazer Silving 2025-06-11 20:34:48 UTC
Maximilian, can you try this quick change? https://invent.kde.org/plasma/kwin/-/merge_requests/7753

In X11, this fixes the "bounceback" at the end of the animation. However in Wayland, the effect is still "too fast" in relation to the global scale. This is almost certainly due to the older motionmanager code written for X11, and will need additional work before it can be called fixed in Wayland.
Comment 10 Maximilian Böhm 2025-06-17 01:58:06 UTC
Thanks Blake, this fixes the bounce at the end!

You wrote in the MR: »However, testing against Wayland shows that the effect is much "faster" than it should be.«
I have compared it between X.org and Wayland, even with a 120 Hz camera recording, and to my eyes… It would be a lie saying I can see a clear difference. The Wayland session maybe, maybe feels a bit more elegant. But you called it "much faster", I would probably see it if it really were that faster here. Maybe there is something else happening on your side? Both sessions have the global speed slider on step 8 on my system.
Comment 11 Vlad Zahorodnii 2025-06-17 11:58:40 UTC
Git commit bfd027652bb98e549d3967202cb675de34b892cc by Vlad Zahorodnii, on behalf of Blazer Silving.
Committed on 17/06/2025 at 11:58.
Pushed by vladz into branch 'master'.

plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3

M  +2    -2    src/plugins/slideback/motionmanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/bfd027652bb98e549d3967202cb675de34b892cc
Comment 12 Vlad Zahorodnii 2025-06-17 13:22:57 UTC
Git commit e5447dff893e095f511c9a329b3dca5b8329a335 by Vlad Zahorodnii.
Committed on 17/06/2025 at 12:42.
Pushed by vladz into branch 'Plasma/6.3'.

plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3


(cherry picked from commit bfd027652bb98e549d3967202cb675de34b892cc)

8e0d4be1 plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3

Co-authored-by: Blazer Silving <breakingspell@gmail.com>

M  +2    -2    src/plugins/slideback/motionmanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/e5447dff893e095f511c9a329b3dca5b8329a335
Comment 13 Vlad Zahorodnii 2025-06-17 13:58:46 UTC
Git commit 287fcc7d2c9236f3fcdcd419c02c64430c972f1e by Vlad Zahorodnii.
Committed on 17/06/2025 at 12:41.
Pushed by vladz into branch 'Plasma/6.4'.

plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3


(cherry picked from commit bfd027652bb98e549d3967202cb675de34b892cc)

8e0d4be1 plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3

Co-authored-by: Blazer Silving <breakingspell@gmail.com>

M  +2    -2    src/plugins/slideback/motionmanager.cpp

https://invent.kde.org/plasma/kwin/-/commit/287fcc7d2c9236f3fcdcd419c02c64430c972f1e
Comment 14 Vlad Zahorodnii 2025-06-17 14:54:29 UTC
Git commit 1771426c7ac87c6858fc4bdec9135d4da2d47ca2 by Vlad Zahorodnii, on behalf of Blazer Silving.
Committed on 17/06/2025 at 14:54.
Pushed by vladz into branch 'master'.

plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3

M  +2    -2    src/plugins/slideback/motionmanager.cpp

https://invent.kde.org/plasma/kwin-x11/-/commit/1771426c7ac87c6858fc4bdec9135d4da2d47ca2
Comment 15 Vlad Zahorodnii 2025-06-17 15:24:45 UTC
Git commit ff88157987728bd8030b825fd2315ae444185f1b by Vlad Zahorodnii.
Committed on 17/06/2025 at 15:13.
Pushed by vladz into branch 'Plasma/6.4'.

plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3


(cherry picked from commit 1771426c7ac87c6858fc4bdec9135d4da2d47ca2)

8d30b8a7 plugins/slideback: Scale smoothness proportionally to adjusted strength from 6.3

Co-authored-by: Blazer Silving <breakingspell@gmail.com>

M  +2    -2    src/plugins/slideback/motionmanager.cpp

https://invent.kde.org/plasma/kwin-x11/-/commit/ff88157987728bd8030b825fd2315ae444185f1b