e74c2e42cf
With the introduction of "shallow" relayouts, we are now able to enter allocation cycles not only at the stage but also deeper down the hierarchy if we know an actors allocation isn't affected by its children since the NO_LAYOUT flag is set. Now that means when queuing relayouts it's possible that `priv->needs_allocation` gets set to TRUE for some actors down the hierarchy, but not for actors higher up in the hierarchy. An actor tree where that happens could look like that: stage -> container -> container2 (NO_LAYOUT) -> textActor With that tree, if the "textActor" queues a relayout, "container2" will be added to the relayout hashtable of the stage and the actors "stage" and "container" will have `priv->needs_allocation` set to FALSE. Now if another relayout on the stage actor is queued, `clutter_stage_queue_actor_relayout()` currently removes all the other hashtable entries in favour of the stage entry, (wrongly) assuming that will allocate everything. It doesn't allocate everything because in the example above "container" has `priv->needs_allocation` set to FALSE, which makes clutter_actor_allocate() return early before allocating its children, so in the end "container2" will never get a new allocation. To fix this, stop flushing the relayout hashtable when queuing a stage-relayout and still add new entries to the hashtable if a stage relayout is already queued to make sure we still go through all the previously queued "shallow" relayouts. That shouldn't hurt performance, too, because as soon as an actor got allocated once, it doesn't need an allocation anymore and should bail out in clutter_actor_allocate() as long as it's absolute position didn't change. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2538 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1173 |
||
---|---|---|
.gitlab/issue_templates | ||
.gitlab-ci | ||
clutter | ||
cogl | ||
data | ||
doc | ||
meson | ||
po | ||
src | ||
tools | ||
.gitignore | ||
.gitlab-ci.yml | ||
config.h.meson | ||
COPYING | ||
meson_options.txt | ||
meson.build | ||
mutter.doap | ||
NEWS | ||
README.md |
Mutter
Mutter is a Wayland display server and X11 window manager and compositor library.
When used as a Wayland display server, it runs on top of KMS and libinput. It implements the compositor side of the Wayland core protocol as well as various protocol extensions. It also has functionality related to running X11 applications using Xwayland.
When used on top of Xorg it acts as a X11 window manager and compositing manager.
It contains functionality related to, among other things, window management, window compositing, focus tracking, workspace management, keybindings and monitor configuration.
Internally it uses a fork of Cogl, a hardware acceleration abstraction library used to simplify usage of OpenGL pipelines, as well as a fork af Clutter, a scene graph and user interface toolkit.
Mutter is used by, for example, GNOME Shell, the GNOME core user interface, and by Gala, elementary OS's window manager. It can also be run standalone, using the command "mutter", but just running plain mutter is only intended for debugging purposes.
Contributing
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.
The coding style used is primarily the GNU flavor of the GNOME coding
style
with some minor additions such as preferring stdint.h
types over GLib
fundamental types, and a soft 80 character line limit. However, in general,
look at the file you're editing for inspiration.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.