Bug 454002

Summary: "closest" window-layout type is broken
Product: [Plasma] kwin Reporter: bastimeyer123
Component: effects-desktop-gridAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: bednarczyk.pawel, breakingspell, nate, notmart, postix
Priority: NOR Keywords: regression
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.1
Sentry Crash Report:
Attachments: Screenrecording: 5.25.2, openSUSE TW, closest
Screenrecording: 5.25.2, openSUSE TW, natural
unnecessary/annoying window re-ordering animation when opening the grid

Description bastimeyer123 2022-05-18 16:35:24 UTC
Initial report: BUG 453943

SUMMARY
After the recent QML rewrite of the desktopgrid effect, the new window-layout implementation (previously called present-windows) introduced glitchy animations when the "closest" layout type is selected. When two or more windows are displayed on the same desktop on the grid, the initial window positions are wrong get updated immediately, leading to an unnecessary "shuffling"/"re-ordering" animation. The "natural" layout type doesn't seem to have this problem, but it's much more wasteful in space, unfortunately.

See https://youtu.be/A0ydBC6tvUQ


STEPS TO REPRODUCE
1. set up a grid with window-layout type set to "closest"
2. open multiple windows
3. open grid and observe the unnecessary initial re-ordering animation of the windows


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4


ADDITIONAL INFORMATION
- KWin built from 09ba8729fc12 (current master) using the modified PKGBUILD of the Arch repos
- kdecoration built from 4123ec8c1993 (current master) using the modified PKGBUILD of the Arch repos
- plasma-wayland-protocols built from 26fb07b9f8d3 (current master) using the modified PKGBUILD of the Arch repos
- the remaining dependencies were all from the official Arch repos
Comment 1 postix 2022-06-25 10:35:07 UTC
*** Bug 455409 has been marked as a duplicate of this bug. ***
Comment 2 bastimeyer123 2022-07-03 12:19:51 UTC
I just checked out 5.25.2, and from what it looks like, the "closest" window layout is behaving correctly now. However, the "natural" window layout is behaving exactly like described in the OP, where the initial window placements trigger an unnecessary and distracting/annoying animation when opening the desktop grid.
Comment 3 postix 2022-07-03 13:06:18 UTC
Created attachment 150362 [details]
Screenrecording: 5.25.2, openSUSE TW, closest

> I just checked out 5.25.2, and from what it looks like, the "closest" window layout is behaving correctly now.
Cannot confirm, 5.25.2 on openSUSE TW, please see the screen recording.
Comment 4 postix 2022-07-03 13:07:13 UTC
Created attachment 150363 [details]
Screenrecording: 5.25.2, openSUSE TW, natural

For comparison, "natural" works better in this regard for me, but it's certainly not optimal.
Comment 5 bastimeyer123 2022-07-03 13:12:00 UTC
What I posted in my previous comment is incorrect. Both window layout modes appear to be broken, "closest" and "natural". It seems to depend on the active windows and their sizes, because for some window combinations, there is no unnecessary/distracting animation, but for others, there is. Not sure how to properly reproduce this.
Comment 6 bastimeyer123 2022-07-20 05:26:18 UTC
Created attachment 150758 [details]
unnecessary/annoying window re-ordering animation when opening the grid
Comment 7 postix 2024-03-05 16:18:03 UTC
I think this can be closed as the "closest" option has been removed in Plasma 6.
Comment 8 Nate Graham 2024-03-05 16:18:54 UTC
6.1, actually. But yeah.