Expand description
GpuSurface on Linux, for the GTK and Kirigami backends: a surface of
our own over the widget that keeps its space, which the app presents to
directly, and the pointer lock the toolkits don’t offer.
- Wayland (
wayland): awl_surface, a desync subsurface of the window’s surface, on the toolkit’s connection. The toolkits’ own routes wait for their frame clocks: GTK’sGtkGraphicsOffloadshowed a frame more latency than a window of the app’s own (2ksbox measured it); a desync subsurface doesn’t wait for the window’s commits. The pointer lock iszwp_locked_pointer_v1with relative motion, and Qt, which has no API for it, inhibits the compositor’s shortcuts withzwp_keyboard_shortcuts_inhibitor_v1. - X11 (
x11): a child window of the window’s, on an xcb connection of our own, which the app may use from any thread. The pointer lock is a pointer grab on it, the cursor warped back to its middle after each move.
Both take no input (an empty input region, an empty input shape), so
the toolkit keeps the pointer, and the backend places them over their
widget after each of the window’s frames. Each lives as long as the
app’s handle, so a GPU surface made on it never outlives it. Other
displays (GTK’s Broadway, Qt’s offscreen platform) get a NoSurface.
Pointer locks report on a thread of their own (LockEvent); the
backend sends what they report to its UI thread.
Modules§
- wayland
- Wayland: the subsurface, the pointer lock and the shortcuts inhibitor, on the toolkit’s own connection.
- x11
- X11: a child window of the toolkit’s window, on an xcb connection of our own, and the pointer lock, a pointer grab on it, with XInput 2’s raw motion for the mouse’s moves before the server’s acceleration.
Structs§
- NoSurface
- A surface on a display that has none to give (GTK’s Broadway, Qt’s offscreen platform, which tests run on): the app is told of it and its size, as headless tells it, but it has no handles to present to.
Enums§
- Lock
Event - What a pointer lock or a shortcuts inhibitor reports, from a thread of its own.
Type Aliases§
- Lock
Sink - Where a lock reports, on its own thread.