# The Desktop Compositor

_Peios / Using Peios / Desktop Basics_

> How the Fenestra compositor arranges windows, how it relates to the shell and its fallback programs, and which window state is shared between devices.

Fenestra arranges windows in a Peios desktop session. Its Rust process
tracks applications and surfaces, while its browser page chooses each
window's size, position, and focus. The same session can appear on several
devices with different layouts.

GXWI starts Fenestra after sign-in and routes authenticated session traffic
to it. Fenestra runs as the session account. It does not receive your
password or perform the browser's sign-in authentication.

## Compositor and shell

The compositor manages surfaces; the shell provides controls such as a
dock and launcher. Fenestra starts the configured shell and grants it
access to desktop-wide operations. Fenesh is one shell that uses those
operations. Fenestra also includes a minimal taskbar and launcher for
sessions without a configured replacement.

The package contains three programs:

| Program | Role |
|---|---|
| `fenestra` | Session compositor, application connections, and desktop page |
| `fenestra-taskbar` | Fallback panel with a button for each window |
| `fenestra-launcher` | Fallback application search overlay |

The fallback programs do not provide Fenesh's wallpaper settings, pinned
dock, welcome application, or power menu. Choosing a shell changes those
controls without replacing Fenestra's window manager.

## Shared and local state

Application surfaces and their workspace assignments belong to the
session. Closing a surface or moving it to another workspace affects every
device attached to that session. Window geometry, focus, dialog position,
and the workspace being viewed belong to each browser page.

The workspace last selected on any device determines where a
subsequent application window opens. Two devices viewing different
workspaces therefore share the choice of destination for that window.

Related content:

- [Arranging Windows and Workspaces](/peios/using-peios/desktop-basics/windows-and-workspaces.md)
- [Session Transitions](/peios/using-peios/desktop-basics/session-transitions.md)
- [Configuring the Session Shell](/peios/using-peios/desktop-service/session-shell.md)
- [Fenestra Implementation Boundaries](/peios/developing-for-peios/gxwi-architecture/compositor-implementation.md)
