mutter/clutter
Jonas Dreßler 3bca29f303 clutter/actor: Only allocate when actor is mapped, not only visible
In theory there's no big difference between only handling mapped actors
vs only handling visible actors in clutter_actor_allocate(): The
function is called recursively starting with an actor that is attached
to a stage, so it should only be called on mapped actors anyway.

The behavior of skipping hidden actors was introduced as an optimization
with commit 0eab73dc. Since the last commit, we handle
enable_paint_unmapped a bit better and don't do unnecessary work when
mapping or unmapping, so we can now be a bit stricter enforcing our
invariants and only allow mapped actors in clutter_actor_allocate().

We need to exclude toplevel actors from this check since the stage has a
very different mapped state than normal actors, depending on the
mappedness of the x11 window. Also we need to make an exception for
clones (of course...): Those need their source actor to have an
allocation, which means they might try to force-allocate it, and in that
case we shouldn't bail out of clutter_actor_allocate().

Also moving the clutter_actor_queue_relayout() call from
clutter_actor_real_show() to clutter_actor_real_map() seems to fix a bug
where we don't queue redraws/relayouts on children when a parent gets
shown.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2973

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1366
2020-10-20 15:27:43 +00:00
..
clutter clutter/actor: Only allocate when actor is mapped, not only visible 2020-10-20 15:27:43 +00:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build clutter: Include semi private cogl API 2020-07-02 19:36:50 +02:00