Re: Managing surfaces with 2 different wl_displays

2020-12-21 Thread Daniel Stone
Hi Nimi,

On Mon, 21 Dec 2020 at 18:50, Nimi Wariboko Jr.  wrote:
> The crux of the issue is that when we create our OpenGL context we create it 
> with a display connection that we initiate. Further down the line when we 
> need to create a wl_egl_window, we are given a wl_surface that was created by 
> a different call to wl_display_connect. Now physically these displays are the 
> same, but it seems when trying to use the foreign surface with our internal 
> wl_display causes this whole thing to not work. I get the following error in 
> Weston 8:
>
> [17:54:27.891] libwayland: invalid object (6), type 
> (zwp_relative_pointer_manager_v1), message attach(?oii)
> [17:54:27.893] libwayland: error in client communication (pid 1340)
>
> My hunch is that calling certain wl_surface functions with a display other 
> than the one that created it is unsupported in weston. I'm primarily mailing 
> this list to confirm this is true and that there are no other possible work 
> arounds.

You're right. It's not just Weston, but Wayland itself. Objects are
local to each wl_display, and may not be shared between different
instances of a wl_display, even if it's the same server at the other
end of the connection.

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


Managing surfaces with 2 different wl_displays

2020-12-21 Thread Nimi Wariboko Jr.
Hi,

I'm currently working on an issue in a cross-platform graphics library
where the OpenGL interface of this API has some presented some issues with
how it is to be integrated with Wayland (
https://github.com/gfx-rs/gfx/pull/3545).

The crux of the issue is that when we create our OpenGL context we create
it with a display connection that we initiate. Further down the line when
we need to create a wl_egl_window, we are given a wl_surface that was
created by a different call to wl_display_connect. Now physically these
displays are the same, but it seems when trying to use the foreign surface
with our internal wl_display causes this whole thing to not work. I get the
following error in Weston 8:

[17:54:27.891] libwayland: invalid object (6), type
(zwp_relative_pointer_manager_v1), message attach(?oii)
[17:54:27.893] libwayland: error in client communication (pid 1340)

My hunch is that calling certain wl_surface functions with a display other
than the one that created it is unsupported in weston. I'm primarily
mailing this list to confirm this is true and that there are no other
possible work arounds.

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