First cut at a cross-"platform" X11/Wayland windowing library

Andrzej andrzejr at xfce.org
Thu Sep 22 12:38:52 CEST 2022


Hi Brian,

This looks really good.

I like you are trying to bridge X11 and Wayland gaps first before 
jumping into Wayland-specific implementation. Frankly, Xfce on Wayland 
has no use to me (others may disagree) if it is too different from Xfce 
on X11, or if the X11 version was to be discontinued. Ideally, the same 
binaries would work seamlessly on both but that means tons of plumbing 
work, discussions with devs of other DEs, as a lot of desktop features 
(even basic ones) are not yet defined in Wayland or are unstable/desktop 
specific (1).

My assumption so far was such task would be too hard to pull off and, to 
avoid damage to the X11 version of Xfce, I was advocating for separating 
Xfce-wayland to a new component, so that both versions of the desktop 
can be developed in parallel. Half measures would be problematic.

Andrzej

[1] https://wayland.app/protocols/

On 22/09/2022 01:12, Brian Tarricone wrote:
> Hi all,
>
> Completely untested, but I threw together a sort of "cross-windowing-environment" start of a wnck-like library, just to see what it might look like.  So far it just supports enumerating workspaces on both X11 (using libwnck) and Wayland (using the not-quite-yet-official ext-workspace-v1 protocol), and getting signals when workspaces are added, removed, and activated.  There's also a dummy impl that just advertises a single workspace, for cases where we're not on X11 and the Wayland compositor doesn't support workspaces.  It's missing a bunch of things, including documentation, but hopefully a glance at the headers (xfw-workspace-manager.h & xfw-workspace.h are the public API interfaces) is enough to get an idea how it works.
>
> My next thought would be to copy over Gaƫl's work from[1] on the Wayland foreign toplevel protocol as the Wayland version of WnckWindow.
>
> One thing I realized is that on Wayland there doesn't appear to be a way to get the list of toplevels on each workspace.  There's no "glue" between the workspace protocol and the foreign toplevel protocol.  That would presumably require some engagement with the people who maintain those protocols in order to fix it, but in the meantime I think it's fine to just pretend that every workspace on Wayland has every toplevel window.  Not ideal, but the best we can do for now.
>
> Another issue is that the Wayland workspaces protocol has the concept of "workspace groups".  The idea -- I think -- is that in a multi-monitor setup, you can have completely independent sets of workspaces per monitor.  My API doesn't account for that, and just flattens all workspace groups into a single "namespace", but it probably makes sense to represent those faithfully, and on the X11 backend it'd just have a single workspace group that contains all workspaces.
>
>       -brian
>
> [0] https://gitlab.xfce.org/kelnos/libxfce4windowing
> [1] https://gitlab.xfce.org/xfce/xfce4-panel/-/merge_requests/96
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev


More information about the Xfce4-dev mailing list