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

Gaël Bonithon trash.paradise at protonmail.com
Fri Sep 23 09:03:41 CEST 2022


Hi Brian,

A few remarks in bulk.

You are of course perfectly free to write the code you want and create a repository to share / show it, but discussions were already going on here and on IRC (which you seem to follow) about the Libxfcewl library (formerly named Libxfwl in my previous mails).

I don't think we're going to create several Wayland related libraries when the creation of only one is already hypothetical, so it would be nice to consult each other before pushing a "competing" library, with a different prefix for symbols by the way.

Concerning the ext-workspace protocol project, I'm quite doubtful. It is precisely only a project (since 2 years) and I think that no known Wayland compositor (from which one can reasonably test something concrete) implements it. So isn't it premature to write code around it?

By the way, regarding what I've programmed so far around the foreign-toplevel-management protocol, it's not limited to a Wayland version of WnckWindow, since there is the show desktop functionality, which is part of WnckScreen.

Anyway, as a result of the discussions already started, I pushed a repository for Libxfcewl: https://gitlab.xfce.org/Tamaranch/libxfcewl
It passes make distcheck for me, I think it's relatively clean (comparable to the existing code in the Xfce namespace anyway).

Cheers,
Gaël

------- Original Message -------
On Thursday, September 22nd, 2022 at 12:12 AM, Brian Tarricone <brian at tarricone.org> 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


More information about the Xfce4-dev mailing list