Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 6.81 KB

README_Wayland.md

File metadata and controls

68 lines (50 loc) · 6.81 KB

Wayland support

This version of Cairo-Dock includes support for running on Wayland, under compositors that support the layer shell protocol. Mainly targeting Wayfire, but possibly others as well, such as labwc, KWin or Cosmic. Note that GNOME Shell / Mutter, including the default Ubuntu desktop, is unfortunately not supported.

Binary packages for Ubuntu 22.04 and 24.04 are available here.

Requirements

Compilation:

  • Please see the original guide for required dependencies. The following assumes that you are able to compile Cairo-Dock without Wayland support already.
  • gtk-layer-shell (recommended at least version 0.6 to support keyboard events)
  • extra-cmake-modules
  • wayland-scanner and Wayland development libraries
  • GTK version at least 3.22 (also tested with version 3.24).

On recent Ubuntu (at least 22.04) and Debian (at least bookworm) versions, these are available by installing the following packages: libgtk-layer-shell-dev, extra-cmake-modules, libwayland-dev and libwayland-bin.

Running:

Tested on Ubuntu 18.04, 20.04 and 22.04 with recent versions of Wayfire (0.7.0 and 0.8.0), labwc (0.6.5), sway and wlroots (0.16.2). Also tested with recent versions of KWin (5.20 and 5.24), running in standalone mode and part of the Plasma Desktop as well.

Compilation

See the original guide for the steps to compile and install Cario-Dock. The cmake configuration summary will report if the required components are enabled based on the availability of required dependencies:

  • You should see * With gtk-layer-shell: yes in the output of cmake. If not, check that the gtk-layer-shell library is properly installed.
  • It will also output * With Wayland taskbar: yes to indicate if Wayland protocols required for taskbar functionality can be built. If not, check that extra-cmake-modules and the wayland-scanner program are properly installed.
  • The enable-gtk-layer-shell cmake option can be used to manually disable / enable layer-shell support.
  • To use hardware acceleration on Wayland, EGL support should be enabled and GLX support should be disabled. If this is not the case, check that the EGL libraries are available.

Running

The WAYLAND_DISPLAY environment variable needs to be set when running on Wayland (typically wayland-1 on recent wlroots or wayland-0 on KWin). Cairo-Dock can be forced to try to use the Wayland or X11 backend with the -L and -X command line switch resepctively. Also, the -c switch can be used to disable OpenGL, and the -o switch to try to force it. These can be useful especially when running in a nested compositor.

When using systemd, starting Cairo-Dock at login can be enabled via the supplied .service file:

systemctl --user enable cairo-dock.service

What works:

  • Dock positioning along a screen edge and keeping above / below and reserving space with the layer-shell protocol.
  • Proper positioning of subdocks, menus and dialogs.
  • Hardware acceleration with EGL.
  • Taskbar if the compositor supports the corresponding protocols.
  • Hiding and recalling docks hidden or kept below.

Known issues and limitations:

  • It is not possible to set global keyboard shortcuts for actions.
  • Subdocks disappear when an app is activated (this is a limitation of using xdg-popups; seems not the be an issue on KWin).
  • Detecting if the dock overlaps with open windows only works on KWin.
  • "Keep the dock below" option is buggy on KWin (at least version 5.24). See here for more info; testing on more recent KWin versions is very welcome!
  • Crashes in some situations which I believe are caused by a bug in wlroots. This is fixed in recent wlroots versions (0.17). For older wlroots versions (0.16), this or this patch should solve it.
  • Multi-monitor support is limited: docks can be placed only on a single screen.
  • Tracking virtual desktops / workspaces is not supported.
  • Dialogs flicker sometimes (although this seems to happen on X11 too in some cases).
  • EGL rendering under Wayland relies on an officially unsupported interface in GTK (i.e. it uses gtk_widget_set_double_buffered() which is only supported on X11); in practice it works well at least with GTK versions 3.22.30 and 3.24.33 on Wayfire and Sway.
  • EGL / OpenGL does not work on older KWin versions (5.20). An error message complains about some layer-shell surfaces having a zero size set; this might be related to the above point. Run the dock with the -c switch.
  • For issues with HiDPI monitors see here; most functionality should work.