Re: is there anyway to get which compositor did the client "wl_display" object connected?

2018-06-14 Thread Pekka Paalanen
On Thu, 14 Jun 2018 16:59:54 +0800 (CST)
tugouxp  <13824125...@163.com> 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 PlatformDisplayWayland::createSurface() 
> const
> 119 {
> 120 if (!m_compositor)
> 121 ¦   return nullptr;
> 122  
> 123 return WlUniquePtr wl_surface>(wl_compositor_create_surface(m_compositor.get()));
> 124 }
> 
> 
> thanks for your support!
> 
> 
> 
> 
> 
> 
> 
> At 2018-06-14 15:15:25, "Pekka Paalanen"  wrote:
> >On Thu, 14 Jun 2018 10:30:35 +0800 (CST)
> >tugouxp <13824125...@163.com> 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  



pgpY28F_CINoR.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re:Re: is there anyway to get which compositor did the client "wl_display" object connected?

2018-06-14 Thread tugouxp
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?


118 WlUniquePtr PlatformDisplayWayland::createSurface() const
119 {
120 if (!m_compositor)
121 ¦   return nullptr;
122  
123 return WlUniquePtr(wl_compositor_create_surface(m_compositor.get()));
124 }


thanks for your support!







At 2018-06-14 15:15:25, "Pekka Paalanen"  wrote:
>On Thu, 14 Jun 2018 10:30:35 +0800 (CST)
>tugouxp <13824125...@163.com> 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
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: is there anyway to get which compositor did the client "wl_display" object connected?

2018-06-14 Thread Pekka Paalanen
On Thu, 14 Jun 2018 10:30:35 +0800 (CST)
tugouxp <13824125...@163.com> 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


pgpojtQVuRWWJ.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


is there anyway to get which compositor did the client "wl_display" object connected?

2018-06-13 Thread tugouxp
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?


thanks for your kindly support.!



___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel