How to properly keep track of wl/xdg output?

ferreiradaselva ferreiradaselva at protonmail.com
Thu May 17 21:48:12 UTC 2018


Oh, the ID is unique for all type of objects! That works :)

Thanks,

Felipe


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On May 14, 2018 5:38 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Sat, 12 May 2018 06:34:36 -0400
> 
> ferreiradaselva ferreiradaselva at protonmail.com 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.
> 
> Hi,
> 
> 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.
> 
> Thanks,
> 
> pq
> 
> wayland-devel mailing list
> 
> wayland-devel at lists.freedesktop.org
> 
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel




More information about the wayland-devel mailing list