effects/overview: Natural WindowHeap Layout
Proposing for 6.3, this MR re-introduces the Natural WindowHeap layout used by several effects, chiefly Overview+Desktop Grid.
Details, discussion, video example: #239 : BUG 488828
Open for any and all feedback or improvement ideas!
Changes:
- The core Natural Layout function is added back to
expolayout.cpp
adjacent to the Grid-Like layout. - Integrate with KCM settings, with new layout set as the default.
- A few changes to the Natural function to catch up with a WindowHeap refactor.
Notes:
-
This makes it so new "Smart" layout simply replaced the old, broken Closest layout option, without taking away the nice, Mac-like Natural layout. Nothing else is changed, no additional error output in the console, nothing is broken.
-
So far, any bugs I've tested with the Overview are reproducible using both layouts, and I've been running this daily from 6.1 onward with no issues. This should ease maintenance for now, and I can commit to maintaining this feature to the best of my ability.
-
The thread details a real-world example (Slack pop-out conversations) where the spatial placement of the window is more crucial than other factors in the placement algorithm. A good example of combining two features of Kwin, it really is useful when set up in this fashion, with the "fan-out" from windows sharing the same custom tile, they are generally predictably placed.
-
The settings experience could be enhanced to better present the option to the user (similar to Tiles editor options). Details are in the linked RFC. I don't feel it is important though as simply restoring the status quo, the setting is already clearly visible in the Overview KCMs. A broader effort to modernize KCM can take care of that when the time comes.