wayland-server: Add API to control globals visibility
authorOlivier Fourdan <ofourdan@redhat.com>
Tue, 18 Oct 2016 14:23:39 +0000 (16:23 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 24 Jan 2017 13:47:59 +0000 (15:47 +0200)
commitd915447365be68a39607a176e03e06a05cb8a72d
tree12e4617433e846670ec269d7030baf2f46d3953e
parent2f72d0a8a82dac8c961cb9b4b509208b84322937
wayland-server: Add API to control globals visibility

Add a new API to let compositor decide whether or not a wl_global
should be advertised to the clients via wl_registry_bind() or
display_get_registry()

By using its own filter, the compositor can decide which wl_global would
be listed to clients.

Compositors can use this mechanism to hide their own private interfaces
that regular clients should not use.

- Hiding interfaces that expose compositor implementation details
  makes it harder for clients to identify the compositor. Therefore
  clients are a little less likely to develop compositor-specific
  workarounds instead of reporting problems upstream.

- Hiding can be used to diminish the problems from missing namespacing:
  if two compositors happen to use the same named global with
  different interfaces for their special-purpose clients, the client
  expecting the different interface would probably never see it
  advertised.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/wayland-server-core.h
src/wayland-server.c