⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module xwayland

Module xwayland 

Source
Expand description

XWayland Compatibility Layer

Provides the socket infrastructure and window mapping for running X11 applications via XWayland on VeridianOS. Full X11 server implementation is deferred to Phase 8; this module establishes the correct architecture and provides the bridge between X11 window IDs and Wayland surface IDs.

§Architecture

XWayland runs as a child process of the compositor, speaking the X11 protocol over a Unix socket pair. It creates Wayland surfaces for each X11 window and forwards input events.

X11 Client -> XWayland Process -> Wayland Compositor
                  |                     |
             X11 protocol          Wayland protocol
             (/tmp/.X11-unix/X0)   (kernel syscalls)

§Current Status

This is a stub implementation that:

  • Creates the X11 socket directory structure
  • Manages X11-to-Wayland window ID mappings
  • Provides the XWayland server lifecycle (start/stop)
  • Logs operations for debugging

Actual X11 protocol handling requires Phase 8.

Structs§

X11WindowMapping
Maps an X11 window to a Wayland compositor surface.
XWaylandServer
XWayland compatibility server.

Enums§

X11Event
Simplified X11 event for the compatibility layer.
XWaylandState
State of the XWayland server process.

Constants§

DEFAULT_DISPLAY
Default X11 display number
MAX_DISPLAY
Maximum display number we will try
X11_LOCK_DIR
X11 lock file directory
X11_SOCKET_DIR
X11 socket directory