On Thu, 14 Jun 2018 16:59:54 +0800 (CST)
tugouxp  <[email protected]> wrote:

> hi:
>  
>   thanks for you answer.
>  
>   i need this on webkitgtk debug scenario, webkitgtk has a nested
> compositor, it seems the "webprocess" of webkit need both connect the
> nest compositer and the system compositors, so there are two some of
> objecet sets with same client type.  for example:
> 
> 
> i dont know which compositor the "wl_compositor_create_surface"
> performs  on? is there any way to know this?
> 

Not really, no, sorry. You could possibly make case for adding some ABI
to libwayland-client to help identify the wl_display, but since you
already wrap the wl_display in a C++ object anyway, you could just have
an id field there.

There doesn't seem to be anything helpful in wl_proxy. It wouldn't be
unthinkable to add wl_proxy_get_display() to return the associated
wl_display. Knowing that a thing is a wl_proxy, you could already
inspect the private fields to find out the wl_display in a debugger.


Thanks,
pq

> 
> 118 WlUniquePtr<struct wl_surface> PlatformDisplayWayland::createSurface() 
> const
> 119 {                    
> 120     if (!m_compositor)
> 121     ¦   return nullptr;
> 122                      
> 123     return WlUniquePtr<struct 
> wl_surface>(wl_compositor_create_surface(m_compositor.get()));
> 124 }
> 
> 
> thanks for your support!
> 
> 
> 
> 
> 
> 
> 
> At 2018-06-14 15:15:25, "Pekka Paalanen" <[email protected]> wrote:
> >On Thu, 14 Jun 2018 10:30:35 +0800 (CST)
> >tugouxp <[email protected]> wrote:
> >  
> >> hi folks:
> >>    there are scenario that when more than one compositor (such as nested 
> >> compositor" ) exists. 
> >> 
> >> 
> >> how to distinguish which server do the client "wl_display*" object 
> >> connected?  is there any way to do this?  
> >
> >Hi,
> >
> >I think you could get the socket fd and fstat() it, but aside that I
> >don't recall anything. There might not even be a file if the connection
> >was created with socketpair(). I'm not sure if you can somehow get the
> >pid of the server process, maybe you can. There is no protocol for
> >identifying the server, but if this is about an app-internal server,
> >you could easily write tiny a protocol extension to identify your
> >internal server from anything else.
> >
> >What do you want to use it for?
> >
> >
> >Thanks,
> >pq  

Attachment: pgpY28F_CINoR.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to