server: add wl_global_remove
authorSimon Ser <contact@emersion.fr>
Sat, 20 Jul 2019 20:36:29 +0000 (23:36 +0300)
committerSimon Ser <contact@emersion.fr>
Wed, 16 Oct 2019 13:32:17 +0000 (16:32 +0300)
commit39852f1146941fa93daf767b4ecfb41b2d11aaef
tree57fc3cae4dd6f3ae5e30a71954b9ffb397d882e1
parent11623e8fddb924c7ae317f2eabac23785ae5e8d5
server: add wl_global_remove

This commit adds a new wl_global_remove function that just sends a global
remove event without destroying it. See [1] for details.

Removing a global is racy, because clients have no way to acknowledge they
received the removal event.

It's possible to mitigate the issue by sending the removal event, waiting a
little and then destructing the global for real. The "wait a little" part is
compositor policy.

[1]: https://gitlab.freedesktop.org/wayland/wayland/issues/10

Signed-off-by: Simon Ser <contact@emersion.fr>
src/wayland-server-core.h
src/wayland-server.c