<div style="font-family: Arial; font-size: 14px;"><span>Hi all,</span><div><br></div><div><span>It seems that I have found a viable, albeit non-native, solution for external panel plugins on Wayland (i.e. plugins running in a separate process).</span></div><div><br></div><div><span>Since I really didn't want to go down the embedding compositor route, I followed a bit of the same idea as the XDG foreign protocol, but for layer shell windows, and using D-Bus instead of the compositor to synchronize the "socket" and "plug" geometries, to follow the GTK terminology.</span></div><div><br></div><div><span>It works quite well, better than I would have thought in fact, especially when moving the panel: since the overlay of the plug and socket is not managed internally by the compositor, we can see that the plugins dissociate a little from the panel when moving, but it remains reasonable. It is not excluded that other side effects appear here or there though, knowing that it also depends on the way the compositor implements the layer-shell protocol.</span></div><div><br></div><div><span>On the other hand, some graphical limitations related to the XEmbed protocol do not apply anymore, as for background images in this issue [1]. By making the plug background transparent, we obtain a homogeneous rendering on the whole panel as with internal plugins.</span></div><div><br></div><div><span>Concerning the code structure it's quite natural, since it keeps the socket/plug structure, and it reuses all the process management and IPC mechanism already in place. I just added some D-Bus signals/methods, and an abstraction layer to distinguish X11 and Wayland implementations of socket/plug.</span></div><div><br></div><div><span>This way, if by chance an extension of the XDG foreign protocol to layer shell windows should come along, or anything else that keeps this socket/plug structure, maintenance should be quite simple. I have little hope that this will happen though, reading this rather informative issue [2] ("Allow embedding foreign wl_surfaces", already quoted in previous threads, and not only closed, but locked...).</span></div><div><br></div><div><span>With this I'm getting closer to something that can be merged anyway [3], it should be good soon after the release of Xfce 4.18 I think :)</span></div></div><div style="font-family: Arial; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
<div class="protonmail_signature_block-user">
Cheers,<br>Gaƫl<div><br></div>
</div>
<div style="font-family: Arial; font-size: 14px;">--</div><div style="font-family: Arial; font-size: 14px;"><span>[1] <a target="_blank" rel="noreferrer nofollow noopener" href="https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/107">https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/107</a></span><div><span>[2] <a target="_blank" rel="noreferrer nofollow noopener" href="https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/74">https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/74</a></span></div><span>[3] <a target="_blank" rel="noreferrer nofollow noopener" href="https://gitlab.xfce.org/xfce/xfce4-panel/-/merge_requests/103">https://gitlab.xfce.org/xfce/xfce4-panel/-/merge_requests/103</a></span><br></div>
</div>