Skip to content

Draft: Port to Wayland (Superseded by !103)

Gaël Bonithon requested to merge Tamaranch/xfce4-panel:wayland into master

This is an experimental branch, which in particular automatically removes certain plugins from the panel at startup. So be sure to save your panel configuration before trying it out with your current user, or better yet, create a test user to do so.

See below for some additional hints, in particular the targeted Wayland compositors.

See the messages of commits titled "wayland: *" for details about porting this or that feature. The commit that precedes them allows to start the panel on Wayland without crashing. The preceding commits are prerequisites or preliminary refactoring, which may be cherry-picked to master along the way.

See also:

Approximate to-do list:

  • layer-shell protocol:
    • Ability to move the panel
    • Set exclusive zones (X11 struts)
    • Autohide adaptations (layer-shell part)
  • foreign-toplevel-management protocol (partial replacement for Libwnck)
    • Autohide adaptations (foreign-toplevel-management part in plain Wayland code)
    • Introduce Libxfwl (for now as part of Libxfce4panel) containing Wayland utilities and GObject wrappers for foreign-toplevel-management, see
    • Rewrite autohide adaptations using Libxfwl
    • Embedded plugins
      • showdesktop
      • systray
      • tasklist
      • windowmenu
  • Ability to run plugins as external (separate processes)


The two main compositors used for this work are Labwc and Wayfire. My preference is Labwc for its simplicity and development goals, but Wayfire seems to be a better reference implementation for the moment, at least on some points.

The real reference implementation of the Wlroots protocols is probably Sway, but it is a tiling compositor, on which moving the panel works very badly. I don't think we should target this compositor, and I don't think the panel works well on i3 either (see for example #308 (closed)).

Weston is also sometimes useful as a reference implementation of general Wayland protocols, although the panel's functionality there is very limited since it does not implement the Wlroots protocols at all. One can also assume that the panel should do the best it can on a compositor of this type, and at least not crash.

It seems very preferable or even necessary to start the compositor from a tty to make proper tests.

Minimum configurations used for the moment:

Labwc (git-master is required for this issue to be fixed, which affects panel movement; autohide does not work for now, see this issue):

  • run by: XKB_DEFAULT_LAYOUT=fr labwc
  • ~/.config/labwc/rc.xml:
    <?xml version="1.0"?>
        <default />
        <keybind key="W-return"><action name="Execute" command="gnome-terminal" /></keybind>

Wayfire (version used >= 0.7.4):

  • run by: wayfire
  • ~/.config/wayfire.ini:
    xkb_layout = fr
    kb_numlock_default_state = true
    0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY
    binding_terminal = <super> KEY_ENTER
    command_terminal = gnome-terminal
Edited by Gaël Bonithon

Merge request reports