Re: Using libweston with GTK/GDK
On Wed, 2019-05-01 at 12:34 +0300, Pekka Paalanen wrote: > > it is all just the normal Wayland protocol exchange but with a new > interface of your own design. I'm not sure if there is a really > minimal example, but I'll list at least some. > > One example of such private protocol extension is > https://gitlab.freedesktop.org/wayland/weston/blob/master/protocol/weston-desktop-shell.xml > > > The privacy of the protocol extension, the installed wayland global > really, is achieved in > https://gitlab.freedesktop.org/wayland/weston/blob/master/desktop-shell/shell.c#L4366 > > shell->child.client = weston_client_start(shell->compositor, > shell->client); > > which creates the Wayland connection before forking the child > process and bind_desktop_shell() then verifying the client trying > to bind to the global is the client that was forked. > Does the client have to be a separate object file? Is it possible to simply call the client's init function directly and then fork? Is that how this works? Have I understood this correctly? How do I get the correct path to pass to weston_client_start()? How does it find my object file? Regards adlo ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: Using libweston with GTK/GDK
On Tue, 7 May 2019 05:24:19 +0100 adlo wrote: > > On 1 May 2019, at 10:34, Pekka Paalanen wrote: > > > > Hi adlo, > > > > it is all just the normal Wayland protocol exchange but with a new > > interface of your own design. I'm not sure if there is a really > > minimal example, but I'll list at least some. > > > > One example of such private protocol extension is > > https://gitlab.freedesktop.org/wayland/weston/blob/master/protocol/weston-desktop-shell.xml > > > > How do I ensure that the GtkWindows open on *my* compositor's > display? How do I get GTK to find my compositor and connect to it? That's a tricky question that revolves around having WAYLAND_DISPLAY environment variable set correctly. There is some related discussion at: https://gitlab.gnome.org/GNOME/gtk/issues/1741 Usually the compositor should set WAYLAND_DISPLAY so that it will be inherited by all launched apps. Obviously this only works on processes forked by the compositor, but that is often the case through helper clients that provide the launcher GUI. Thanks, pq pgpw4K9obBI6C.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel