dbb95cbe5f
This is a workaround for X11 games which use randr to change the resolution in combination with NET_WM_STATE_FULLSCREEN when going fullscreen. Newer versions of Xwayland support the randr part of this by supporting randr resolution change emulation in combination with using WPviewport to scale the app's window (at the emulated resolution) to fill the entire monitor. Apps using randr in combination with NET_WM_STATE_FULLSCREEN expect the fullscreen window to have the size of the emulated randr resolution since when running on regular Xorg the resolution will actually be changed and after that going fullscreen through NET_WM_STATE_FULLSCREEN will size the window to be equal to the new resolution. We need to emulate this behavior for these games to work correctly. Xwayland's emulated resolution is a per X11 client setting and Xwayland will set a special _XWAYLAND_RANDR_EMU_MONITOR_RECTS property on the toplevel windows of a client (and only those of that client), which has changed the (emulated) resolution through a randr call. This commit checks for that property and if it is set adjusts the fullscreen monitor rect for this window to match the emulated resolution. Here is a step-by-step of such an app going fullscreen: 1. App changes monitor resolution with randr. 2. Xwayland sets the _XWAYLAND_RANDR_EMU_MONITOR_RECTS property on all the apps current and future windows. This property contains the origin of the monitor for which the emulated resolution is set and the emulated resolution. 3. App sets _NET_WM_FULLSCREEN. 4. We check the property and adjust the app's fullscreen size to match the emulated resolution. 5. Xwayland sees a Window at monitor origin fully covering the emulated monitor resolution. Xwayland sets a viewport making the emulated resolution sized window cover the full actual monitor resolution. https://gitlab.gnome.org/GNOME/mutter/merge_requests/739 |
||
---|---|---|
.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.