Managing surfaces with 2 different wl_displays

Daniel Stone daniel at
Mon Dec 21 19:36:03 UTC 2020

Hi Nimi,

On Mon, 21 Dec 2020 at 18:50, Nimi Wariboko Jr. <nimiwaribokoj at> 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.


More information about the wayland-devel mailing list