Expand description
Wayland cursor shape to PNG resolution and the cursor delivery worker.
Wayland cursor shape resolution: converts a CursorImageStatus into a PNG image buffer
suitable for the Python cursor callback. Uses xcursor to load the system cursor theme
and render the appropriate frame at the current scale.
Structs§
- Cursor
- The loaded XCursor theme, held for the whole capture so cursor lookups stay cheap.
Enums§
- Cursor
Job - One unit of cursor-callback work handed from the calloop thread to the
wl-cursorworker. The calloop resolves everything renderer/surface-affine (SHM copies, dmabuf readbacks, hotspots); the worker does the PNG encode, the cache, and the GIL-bound Python call so none of that latency lands on the input/render thread. One channel keeps cursor updates ordered with callback (re)registration.
Functions§
- spawn_
cursor_ worker - Spawn the cursor delivery worker; returns its job channel. The worker owns its own
theme handle, the PNG cache, and the Python callback for the life of the process (like the
compositor thread itself);
PY_SHUTDOWNgates every Python call.