mcpp index

freedesktop.wayland-cursor

#include

libwayland-cursor 1.26.0 — load an XCursor theme into a wl_buffer, for clients that set their own pointer

#include <wayland-cursor.h>
mcpp add freedesktop.wayland-cursor@1.26.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// freedesktop.wayland-cursor — the client-side pointer.
//
// WHAT CANNOT BE ASSERTED HERE, AND WHY THE FIRST VERSION OF THIS FILE CRASHED
//
// `wl_cursor_theme_load(name, size, shm)` is not callable without a compositor,
// and not merely inadvisable: line 410 of upstream's wayland-cursor.c is
//
//     theme->pool = shm_pool_create(shm, size * size * 4);
//
// which reaches `wl_shm_create_pool(shm, ...)` and dereferences the proxy with
// no null check. The first version of this test passed `nullptr` on the theory
// that only the theme PARSER would run — it segfaulted (exit 139). A `wl_shm`
// comes from a compositor's registry, so the buffer half of this library
// belongs in a program that has one, exactly as opening /dev/input/event*
// belongs outside tests/examples/libinput.
//
// WHAT IS ASSERTED IS STILL THE PART THAT CARRIES THE PACKAGING RISK: that the
// hand-written module wrapper exports every name, that the two PUBLIC structs
// are usable as values rather than opaque handles, and that libwayland-client
// is really linked in. The compiled-in cursor search path being empty — the
// other packaging decision — is checked in the fork's CI by grepping the
// binary, which is the only place it is visible.
// …

tests/examples/wayland-cursor/tests/wayland-cursor.cpp · project tests/examples/wayland-cursor

Build

Form A package: the upstream archive ships its own mcpp.toml at */mcpp/cursor/mcpp.toml. Its contents have not been fetched into this build — run the index's refresh action to pull them in.

Versions

VersionPlatforms Mirrorssha256
1.26.0 latest Linux GLOBAL CN 9bce2cc00c61…