mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
0b6a3166ed
In clutter_text_queue_redraw_or_relayout() we check whether the size of the layout has changed and queue a relayout if it did, otherwise we only queue a redraw and save some resources. The current check for this also queues a redraw if the actor has no valid allocation. That seems right on the first glance since the actor will be allocated anyway, but we actually want to call clutter_actor_queue_relayout() again here because that also invalidates the size cache of the actor which might have been updated and marked valid in the meantime. So make sure the size cache is always properly invalidated after the size of the layout changed and also call clutter_actor_queue_relayout() in case the actor has no allocation. This fixes a bug where getting the preferred width of a non-allocated ClutterText, then changing the string of the ClutterText, and then getting the preferred width again would return the old cached width (the width before we changed the string). The only place where this bug is currently happening is in the overview, where we call get_preferred_width() on the unallocated ClutterText of the window clone title: When the window title changes while the ClutterText is unallocated the size of the title is going to be wrong and the text might end up ellipsized or too large. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1150 |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |