Skip to content

wayland: Rework Xcursor theme loading

Vlad Zahorodnii requested to merge work/zzag/manual-cursor-loading into master

Xcursor loading code has hardcoded search paths, in order to take into account distros installing app data in a different location, libwayland-cursor sets the ICONDIR to the icon directory computed based on the install prefix.

However, that won't work with gitlab CI because it relocates binaries. A more robust way to find cursors would be to use QStandardPaths to find all the icon directories on the system.

Another advantage of using own cursor loading code is that it allows us to reuse cursor images that are symlinks. For example, with breeze_cursors, almost half of the files in the cursors directory are symlinks.

The main disadvantage of this approach is that we would have to keep the search paths up to date. However, on the hand, there are not that many of them, e.g. ~/.icons, ~/.local/share/icons, /usr/share/icons, /usr/local/share/icons. The last three are implicitly handled by the QStandardPaths.

Edited by Vlad Zahorodnii

Merge request reports