contents

XWayland#

X11 apps run under XWayland, managed by carrot's own built-in X window manager. There is no libxcb anywhere; carrot speaks the X11 wire protocol itself.

Lifecycle#

XWayland starts lazily: the server spawns when the first X11 client knocks on the display socket, and respawns if it dies. carrot claims a display number by scanning :100 through :199 for a free slot, and the boot log says which one (xwayland on :100 (lazy)). DISPLAY is set for everything carrot spawns and pushed to the session environment, so bus-activated apps find it too.

How X windows behave#

X windows join the same tiling tree, floating stack, window rules, and remaps as native windows; burrow clients marks them with "xwayland":true. Match them in rules with is-xwayland #true. Override-redirect windows (menus, tooltips, splash screens) go straight to the floating layer, unmanaged, as X expects. Map requests are always granted, and a window appears on screen once X has mapped it and it has committed a real buffer, which kills the gray-flash-then-content artifact.

The WM advertises a single desktop to X clients; workspace behavior stays carrot's business.

Clipboard#

CLIPBOARD and PRIMARY both bridge in both directions between X and Wayland. One current limit: INCR transfers (X's protocol for very large clipboard payloads) are not implemented, so copying multi-megabyte data out of an old X app can fail; normal-sized clipboard traffic is unaffected. X11 drag-and-drop (XDND) is not bridged yet either; native Wayland DnD works.

When XWayland exits, X-backed clipboard offers are dropped cleanly so a paste never hangs against a dead bridge.

Debugging#

carrot xparsnip-probe connects to an X server as a plain client and reports what it finds, useful when an X app misbehaves.