x11

package
v0.0.0-...-452f342 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package x11 provides helpers for talking to a local X server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForDisplay

func WaitForDisplay(display string, timeout time.Duration) time.Duration

WaitForDisplay blocks until the X server is reachable on display :N, returning the time spent waiting. It tries both the named unix socket (Xorg, headful) and the abstract namespace socket (Xvfb runs with -nolisten unix, which disables the named socket but leaves the abstract one). Cheaper than spawning xdpyinfo in a loop.

If the deadline elapses, WaitForDisplay still returns; callers can compare the returned duration against timeout to detect a miss.

func WaitForMutter

func WaitForMutter(timeout time.Duration) time.Duration

WaitForMutter blocks until the mutter window manager has registered with the X server, returning time spent waiting. Chromium negotiates CSD (no WM titlebar) at window-map time; if mutter isn't up yet, it later reparents the already-mapped window with default SSD decoration and a titlebar appears. Polls `xdotool search --class mutter` to match the wrapper's readiness check.

If the deadline elapses, WaitForMutter still returns; callers can compare the returned duration against timeout to detect a miss.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL