How to properly keep track of wl/xdg output?

Pekka Paalanen ppaalanen at
Mon May 14 08:38:33 UTC 2018

On Sat, 12 May 2018 06:34:36 -0400
ferreiradaselva <ferreiradaselva at> wrote:

> Hi,
> Excuse me if this is something that is already explained in the protocols, but I couldn't find the solution by myown.
> I'm working on a client-side library, and I need to keep track of wl (or xdg in the future) outputs. My first idea was:
> - Have a `wl_list` in my context
> - In the global listener, add the `wl_output` to the list
> - In the global remove listener, remove the `wl_output` from the list
> However, in the global remove listener, we only have a "uint32_t
> id" parameter. How am I supposed to know that the type of the
> object being removed is a `wl_output`? In the global listener we
> at least have a "const char *interface" that let us know that.


the 'global_remove' event's 'name' argument is the same as the
'global' event's 'name' argument. Match the removed name to the
added names you've received earlier, and you'll find out which
global exactly is being removed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the wayland-devel mailing list