WIP: overviewControl: Prevent devision by zero
Under certain conditions
return wrongly cached zeros, causing the function to return
One consequence of that is that it prevents us from landing mutter@7bf2058a
Fix the issue by explicitly relayout the actor. This happens once every time the overview is opened, so the performance pernality should be small, especially compared to the gain we can get with the former mentioned commit.
More context: Another proposed solution (see #892 (comment 402432)) is to fix the issue in clutter by not caching the values if the vfunc is overridden. I'm against that, because to quote myself:
After having a short look into your proposed solution I'd argue against disabling caching if there is an override. I'm counting at least 24 places where
vfunc_get_preferred_heightis overridden, not counting extensions. And it's basically all over the place. Disabling the cache has a huge impact on performance and this is the only case AFAIK that is causing problems. And that is only because the values are somewhat carelessly divided without extra safeguards. I'd say we just add
queue_relayout(). It's an improvement over the actual situation with low overhead and lets us land mutter@7bf2058a, which is quite a win.
If we come up with a general solution at some point that would be great. I'd consider this issue as to unusual to require it.