Xfce Wayland Development Roadmap
Short Term Plans
For Xfce 4.18, the plan is to ensure our applications are working acceptably on Wayland (those that already work or can be made to work with low effort). So, basically start testing with Weston and see if all menus, etc behave normally and ifdef Xlib code.
Check the table in the component specific section for details and labelled issues by group:
Long Term Goals
It is not clear yet which Xfce release will target a complete Xfce Wayland transition (or if such a transition will happen at all). Below is a list of larger tasks which would need to be done in some way for such a transition to occur.
Some of them are mostly agreed on by the Xfce devs, others are somewhat controversial (or no decision has been made so far).
- Do not depend on XWayland
- No xsettings
- Use wlroots over libmutter
- keep posibillity to run xfdesktop and xfce4-panel as separate components
- Prevent dependency on libgnome-desktop
- xfce4-panel and xfdesktop have been ported to Wayland using wlroots. There is also an unofficial port of xfwm4 in progress.
Topics under discussion
- What about X11 backward compatibility?
- As long as Nvidia does not support Wayland (by providing open drivers), it would be good to keep X11 backward compatibility (nouveau driver usually is slower)
- Wayland compositors which were written from scratch like Weston or sway will never run as a x11 window manager. But others which started as x11 window managers such as kwin or mutter still keep their x11 window management code
- We do not have the resources to maintain our own Wayland compositor
- FreeBSD provides https://hikari.acmelabs.space, not sure what is the situation for OpenBSD (possibly libinput missing?)
Component specific status
|thunar||ok (Missing icons will be fixed when xfsettingsd runs fine for wayland)||not used||-|
|xfce4-panel ≤ 4.18.x||Wont start. Error related to libwnck (is X11 only)||malfunctions (no movement, rough click event, …)|
|xfdesktop ≤ 4.18.x||no (crash on startup)|
- Port to Wayland done (Wlroots-based, targeted compositors: Labwc, Wayfire): https://gitlab.xfce.org/xfce/xfce4-panel/-/merge_requests/103
- On Wayland the panel cannot use GtkSocket/GtkPlug any more to run plugins as external (separate processes). Initially, to advance in the porting of other features, it is enough to run them as internal (same process as the panel, so the crash of a plugin causes the panel to crash). If we want to get this back “natively” afterwards, it seems that we'll have to make the panel a Wayland compositor to some extent (Embedding Compositor, see also Allow embedding foreign wl_surfaces). For the moment the socket/plug structure has been reproduced on Wayland using the layer-shell protocol and D-Bus, which, although not native, has the merit of simplicity and of reusing what exists (see also https://mail.xfce.org/pipermail/xfce4-dev/2022-October/033092.html).
- Regarding tray icons, the panel already implements the freedesktop.org StatusNotifierItem specification. Though the plugins don't use those yet. Some plugins could be ported to do so. –> We would need some sample skeleton to start from to make it easier for contributors.
- Port to Wayland done: https://gitlab.xfce.org/xfce/xfdesktop/-/merge_requests/43
- Workspaces support needs an X11/Wayland abstraction, and could use the wlr-workspace-unstable-v1 protocol on Wayland.
- Listing all toplevel windows (windowlist menu, window icons on desktop) needs an X11/Wayland abstraction, and could use the wlr-foreign-toplevel-management-unstable-v1 protocol on Wayland.
- Unofficial port to Wayland in progress: https://github.com/adlocode/xfwm4/tree/wayland
|xfce4-terminal||drop-down requires layer-shell to work properly: !72|
|xfce4-notifyd||notifications show in middle of screen, are decorated, and aren't always-on-top (fixed in 0.9.x)|
|xfce4-taskmanager||ok||no libwnck (appicons, #75), no “identify window”, no systray icon (#78)|
|parole||ok (crash on startup fixed)||no systray icon (#126)|
|xfce4-screenshooter||no (crash after region is selected)||Issues|
|gigolo||ok||settings dialog crashes (segfault, fixed)|
GTK doesn't appear to do anything special if you set a window to be override-redirect or always-on-top. Window positioning isn't (always) controllable by the app on Wayland.
MR for fixes: apps/xfce4-notifyd!37
Wayland does not specify a native interface for the compositor for taking screenshots yet. Though there is a DBUS API offered by gnome(mutter?) for a desktop portal and as well wlroots has a screenshot protocol
So for xfce4-screenshooter there are the following options:
- Add DBus Support for org.freedesktop.portal.Screenshot (like that afaik screenshots should work with mutter)
- Add support for the wlroots screenshot protocol (link?)
- wait until wayland specifies a native interface (see here), and use it when available (Would make alot of sense for many applications, e.g. any video conferencing tool for screencast, so they dont need to implement multiple API's)
Note that backends for xdg-desktop-portals are as well in development for kde and wlroots:
Currently (Feb 2020) both API's will give screenshots of the whole screen to any client. So far the user has not to approve a screenshot / give permission to specific applications (like e.g. on android). So the security is comparable to the X-Server.
|thunar-vcs-plugin||ok (tested git)||not used||-|
See details in the xfce4-panel section about how to run external plugins on Wayland. At first, “works” below simply means “doesn't crash”, even after some elementary manipulations (eventually). It does not mean that everything works like on X11.
The tests below were performed on 2022-10-12 by building from git-master for each plugin.
|xfce4-calculator-plugin||works (insensitive text entry)|
|xfce4-clipman-plugin||Ported to Wayland for the main part (clipboard manager via wlr-data-control), remains to do: use status notifier instead of status icon|
|xfce4-datetime-plugin||works (merged in clock plugin since 4.17.4)|
|xfce4-embed-plugin||outdated, probably unusable on Wayland anyway|
|xfce4-eyes-plugin||works (the pointer is not followed outside the panel)|
|xfce4-mpc-plugin||works (though probably relying on non working stuff)|
|xfce4-notes-plugin||works (colors all the panel in yellow (fixed), removing the plugin makes the panel quit (fixed))|
|xfce4-places-plugin||works (icon issue, criticals when removing the plugin)|
|xfce4-pulseaudio-plugin||works (with warnings), can crash (Libwnck): fixed|
|xfce4-smartbookmark-plugin||works (insensitive text entry)|
|xfce4-statusnotifier-plugin||crashes (gdk_x11 code, merged in systray plugin since 4.15.4 anyway)|
|xfce4-time-out-plugin||works (coredumps on pause and criticals whem removing/re-adding the plugin)|
|xfce4-timer-plugin||works (removing the plugin makes the panel quit (fixed))|
|xfce4-verve-plugin||works (insensitive text entry)|
|xfce4-whiskermenu-plugin||works (icons issue, menu window floating)|
|xfce4-windowck-plugin||does not work (Libwnck)|
Info about testing specific components.
Regarding the version to test: master, or latest dev release would be best, though latest stable release as well will do. Currently there is not much difference for most components. If you dont test master, best add info on which version you tested.
If you run a NVidia GPU, you will need to use the “Nouveau” driver for testing, Since the proprietary NVidia driver does not provide Wayland support. (Though some things might work in some cases)
In general, XWayland only is relevant if native Wayland does not work.
- Maybe set a minimal configuration, for example
[keyboard] keymap_layout=fr numlock-on=true
westonin a terminal emulator, or better: in a tty with a different user, or by logging out of the X11 session first (the compositor may not have quite the same behavior, and this avoids interactions with the current environment)
- If run in a terminal emulator, make sure at least the component to test isn't already running in your X11 session (e.g Thunar as daemon)
- Open a terminal in the Weston session and start the component which is to be tested
- Install the package
- As above, but start weston with
weston --xwaylandand run the app with
- Some additions may sometimes be necessary, like
--backend=x11-backend.so. See also https://wayland.freedesktop.org/xserver.html