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.
The tray icon (tray) is a StatusNotifierItem over GIO’s D-Bus,
which both toolkits’ loops run.
Modules§
- tray
- The tray icon on Linux, for both backends: a StatusNotifierItem, the
spec Plasma’s system tray, waybar, swaybar and GNOME’s AppIndicator
extension show, with its menu as
com.canonical.dbusmenu. GTK 4 has no tray, and KDE’sKStatusNotifierItemneeds KDE Frameworks, which the Kirigami shim doesn’t link, so both backends export the item here, over GIO’s D-Bus: GTK runs GLib’s loop, and Qt’s loop on Linux is GLib’s too (its GLib event dispatcher), so the calls come in on either. - 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.