server: add wl_global_set_user_data

When implementing a workaround for [1], one needs to accept a global to be
bound even though it has become stale.

Often, a global's user data is free'd when the global needs to be destroyed.
Being able to set the global's user data (e.g. to NULL) can help preventing a

(The laternative is to make the compositor responsible for keeping track of
stale user data objects via e.g. refcounting.)

[1]: wayland/wayland#10

Signed-off-by: Simon Ser <>
1 job for global-set-user-data in 11 seconds (queued for 36 seconds)
Status Job ID Name Coverage
failed #438065


Name Stage Failure
build-native Build
Checking out f862722b as global-set-user-data...
fatal: reference is not a tree: f862722b3e508447bb290aaf65d8a623d0388268
Uploading artifacts...
WARNING: build-*/wayland-*.tar.xz: no matching files
WARNING: build-*/wayland*/_build/sub/*.log: no matching files
WARNING: build-*/*.log: no matching files
WARNING: prefix-*: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1