Expand description
XWayland and Smithay’s X11 window manager, driven by the window policy.
XWayland for the compositor’s own desktop: the Xwayland server spawned and kept running,
and Smithay’s X11 window manager driven as the window policy decides.
Started only under a window policy (Compositor::start_xwayland, which SELKIES_WM on the
Wayland backend asks for): the X11 clients become windows of the same Space as the Wayland
ones (Window::new_x11_window), told to the policy through the same events with their
ICCCM and EWMH details read into a WindowInfo (class and instance, transient parent, window
type, size hints, Motif decorations, the states they asked for), and placed, framed, and
stacked by the same commands. Override-redirect windows (menus, tooltips, drag icons) are
placed where they ask, above everything, and never told to the policy, as X11 requires.
Smithay’s manager handles the selections (clipboard and primary between X11 and Wayland
clients), XDND, _NET_CLIENT_LIST, _NET_WM_STATE, and _NET_WM_MOVERESIZE; what it does
not publish and a desktop reads (_NET_WORKAREA, _NET_ACTIVE_WINDOW,
_NET_CLIENT_LIST_STACKING, _NET_FRAME_EXTENTS) is written here over a second connection to
the same server, since the manager’s own is private to it, and so is the name it answers to
on its check window (publish_name). A crashed Xwayland is started
again after a short wait, so an X11 client started later still finds a server.
Where the host has no DRM render node, the EGL vendor library a GPU container runtime injects
(NVIDIA’s) segfaults inside Xwayland’s EGL initialization, and glamor would have nothing to
accelerate there anyway, so Xwayland starts pinned to Mesa’s EGL vendor, loading no external
EGL platform, with its buffers in shared memory (-shm, no_render_node_launch). An
Xwayland a caller ships beside its own executables is named by PIXELFLUX_XWAYLAND
([XWAYLAND_VAR]) and found ahead of the host’s for that child alone.
Structs§
- Atoms
- Atoms
Cookie - Extras 🔒
- The second X connection and the atoms it writes with.
- XwmState
- The X11 side of the compositor.
Constants§
- MESA_
EGL_ 🔒VENDOR - The glvnd vendor file of Mesa’s EGL, the vendor Xwayland is pinned to without a render node.
- NET_
WM_ 🔒NAME - The manager’s name on the supporting check window, which clients read to decide how to behave: Chromium and Electron draw their own frame only under a window manager they know by this name and ask for a server frame under any other, Smithay’s own among them, so the manager answers to the name the X11 backend’s manager gives, the one whose behavior the policy carries.
- RESTART_
DELAY 🔒 - How long a crashed Xwayland waits before it is started again.
- XWAYLAND_
VAR - Where the Xwayland a caller ships is named, an executable called
Xwayland; unset, the first on thePATH.
Functions§
- configure
- Carry a configure out on an X11 window: its geometry and its states.
- ensure_
x11_ 🔒socket_ dir - The directory X servers put their sockets in, which only an X server or a display manager creates: on a backend that runs no Xvfb nothing has, and Xwayland’s sockets cannot be made without it.
- maintain
- Start the server again where it exited and its wait passed; called on the frame timer.
- no_
render_ 🔒node_ launch - The environment and arguments Xwayland starts with: the
PATHthat finds a named Xwayland (xwayland_path); nothing more where the host has a DRM render node, else Mesa’s EGL vendor where it is installed, no external EGL platform, and-shm. - publish_
frame _NET_FRAME_EXTENTSand_NET_WM_ALLOWED_ACTIONSon a window the policy framed.- publish_
name 🔒 - Rename Smithay’s supporting check window to
NET_WM_NAME. - publish_
stacking _NET_ACTIVE_WINDOWand_NET_CLIENT_LIST_STACKING, after a focus or stacking change.- publish_
supported 🔒 - Publish what the manager supports beyond Smithay’s own list, so clients ask for it.
- publish_
workarea _NET_WORKAREAfrom the policy’s outputs: the primary’s workarea, as one desktop.- start
- Spawn Xwayland and arm the start of its window manager once it is ready.
notifyis told the display number when it is. - window_
info - What the policy is told about an X11 window.
- window_
of 🔒 - The policy’s window for an X11 surface.
- window_
type_ 🔒of - xwayland_
path 🔒 - The
PATHXwayland is looked up on: the directory of the oneXWAYLAND_VARnames ahead of the process’s own, so a bundle’s Xwayland is found first for this child alone and the session’s applications keep the host’s programs;Nonewhere none is named or it is not there.