WindowClone: Layout in allocate virtual
Currently we are doing most of the layout management by hardcoding x, y, width and height of our child actors. However we can make the whole thing simpler and more robust by doing the layout management in the allocate virtual method as recommended by clutter docs.
Since the root cause for the following issues was that we didn't allocate some children on rare occasions which was fixed in this PR this fixes https://github.com/elementary/gala/issues/2053 and fixes https://github.com/elementary/gala/issues/1898 and therefore closes #2072
There are still some issues when windows spawn while multitasking view is open (like for example they reserve space but don't show) that I would like to tackle in follow up PRs but at least it doesn't completely break anymore as on current main :)
fixes #2088
Tooltips also appear to be cut off and text looks pretty gnarly. Although when I went back to get a screenshot the other textures all look aligned correctly here :thinking:
This branch:
main:
@danirabbit the allocations are clamped to pixels now could you try again with that? I'm not so good at noticing those differences :sweat_smile: (and the tooltip thing I don't seem to be able to reproduce, probably requires a very specific window size and name :shrug:)
~So fedora is failing because for some reason it compiles with stricter rules (?) about implicit function declaration and clutter_actor_get_relative_transformation_matrix is defined in clutter-mutter.h and not clutter.h which we don't include anywhere. And we can't include it because it pulls in _private headers that aren't shipped. At least that's what I figured maybe I'm wrong somewhere :)~
See comment below
Nvm I found a utility method that's much better to use in this case and properly exported :)
@leolost2605 Is this ready for review? I really want to include this in 8.0.4 release.
One thing I noticed is that clone no longer has magnifying filters? clone.set_content_scaling_filters (Clutter.ScalingFilter.TRILINEAR, Clutter.ScalingFilter.TRILINEAR); seems to fix this.
@lenemter yes it's ready.
I've added the filters although TBH i don't really know what they do :sweat_smile:
Opened https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4156 for your missing includes…
Thank you!
@danirabbit Can you review this branch please?
There are still some issues when windows spawn while multitasking view is open (like for example they reserve space but don't show) that I would like to tackle in follow up PRs but at least it doesn't completely break anymore as on current main :)
From the description (the breaking refers to the version before the workaround was merged)
If it's a must I can do it here though :shrug: