1818d21da5
Virtual monitors are monitors that isn't backed by any monitor like hardware. It would typically be backed by e.g. a remote desktop service, or a network display. It is currently only supported by the native backend, and whether the X11 backend will ever see virtual monitors is an open question. This rest of this commit message describes how it works under the native backend. Each virutal monitor consists of virtualized mode setting components: * A virtual CRTC mode (MetaCrtcModeVirtual) * A virtual CRTC (MetaCrtcVirtual) * A virtual connector (MetaOutputVirtual) In difference to the corresponding mode setting objects that represents KMS objects, the virtual ones isn't directly tied to a MetaGpu, other than the CoglFramebuffer being part of the GPU context of the primary GPU, which is the case for all monitors no matter what GPU they are connected to. Part of the reason for this is that a MetaGpu in practice represents a mode setting device, and its CRTCs and outputs, are all backed by real mode setting objects, while a virtual monitor is only backed by a framebuffer that is tied to the primary GPU. Maybe this will be reevaluated in the future, but since a virtual monitor is not tied to any GPU currently, so is the case for the virtual mode setting objects. The native rendering backend, including the cursor renderer, is adapted to handle the situation where a CRTC does not have a GPU associated with it; this in practice means that it e.g. will not try to upload HW cursor buffers when the cursor is only on a virtual monitor. The same applies to the native renderer, which is made to avoid creating MetaOnscreenNative for views that are backed by virtual CRTCs, as well as to avoid trying to mode set on such views. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698> |
||
---|---|---|
.gitlab/issue_templates | ||
.gitlab-ci | ||
clutter | ||
cogl | ||
data | ||
doc | ||
meson | ||
po | ||
src | ||
subprojects | ||
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.
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 forgboolean
, andguint
/gulong
for GSource ids and signal handler ids. That means e.g.uint64_t
instead ofguint64
,int
instead ofgint
,unsigned int
instead ofguint
if unsignedness is of importance,uint8_t
instead ofguchar
, 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. The naming convention for flags is
typedef _MetaSomeThingFlags { META_SOME_THING_FLAG_NONE = 0, META_SOME_THING_FLAG_ALTER_REALITY = 1 << 0, META_SOME_THING_FLAG_MANIPULATE_PERCEPTION = 1 << 1, } MetaSomeThingFlags;
-
Use
g_new0()
etc instead ofg_slice_new0()
. -
Initialize and assign floating point variables (i.e.
float
ordouble
) using the formfloating_point = 3.14159
orratio = 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.