Go to file
Jonas Ådahl d43c8cd842 window: Freeze stack when calculating showing state
Constantly manipulating the stack caused severe stalls (several seconds)
with many open windows when switching workspaces. The cause for this was
that each show/hide call dealt with the stack in isolation, meaning if
you hid N windows, we'd manipulate and synchronize the stack N times,
potentially doing synchronous calls to the X server while doing so.

Avoid the most severe stalls by freezing the stack while calculating
showing; this made the worst case go from several seconds to around
10-20 ms, which is still bad, but by far not as bad.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1616>
2020-12-01 11:41:11 +00:00
.gitlab/issue_templates
.gitlab-ci ci: Include gdm in image 2020-11-20 20:19:50 +01:00
clutter clutter: Do not emit signals during ClutterBackend finalization 2020-11-27 15:14:34 +00:00
cogl
data
doc Add MetaGravity and replace X11 equivalent with it 2020-02-29 21:01:50 +00:00
meson
po Update POTFILES.in 2020-11-28 13:36:34 +01:00
src window: Freeze stack when calculating showing state 2020-12-01 11:41:11 +00:00
subprojects
tools tools: Remove obsolete ppa-magic.py 2018-11-30 11:12:12 +08:00
.gitignore
.gitlab-ci.yml ci: Build and test also on aarch64 2020-11-23 17:53:36 +01:00
config.h.meson
COPYING
meson_options.txt
meson.build build: Bump pango version to 1.46.0 2020-11-22 14:57:02 +01:00
mutter.doap
NEWS
README.md README: Elaborate coding style and commit message guidelines 2020-10-28 07:28:55 +00:00

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.

It can be useful to look at the documentation available at the Wiki.

Coding style and conventions

The coding style used is primarily the GNU flavor of the GNOME coding style with some additions:

  • Use regular C types and stdint.h types instead of GLib fundamental types, except for gboolean, and guint/gulong for GSource ids and signal handler ids. That means e.g. uint64_t instead of guint64, int instead of gint, unsigned int instead of guint if unsignedness is of importance, uint8_t instead of guchar, and so on.

  • Try to to limit line length to 80 characters, although it's not a strict limit.

  • Usage of g_autofree and g_autoptr are encouraged. The style used is

  g_autofree char *text = NULL;
  g_autoptr (MetaSomeThing) thing = NULL;

  text = g_strdup_printf ("The text: %d", a_number);
  thing = g_object_new (META_TYPE_SOME_THING,
                        "text", text,
                        NULL);
  thinger_use_thing (rocket, thing);
  • Declare variables at the top of the block they are used, but avoid non-trivial logic among variable declarations. Non-trivial logic can be getting a pointer that may be NULL, any kind of math, or anything that may have side effects.

  • Instead of boolean arguments in functions, prefer enums or flags when they're more expressive.

  • Use g_new0() etc instead of g_slice_new0().

  • Initialize and assign floating point variables (i.e. float or double) using the form floating_point = 3.14159 or ratio = 2.0.

Git messages

Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit. Try to always prefix commit subjects with a relevant topic, such as compositor: or clutter/actor:, and it's always better to write too much in the commit message body than too little.

License

Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.