COSMIC Desktop support
any plan to support COSMIC Desktop
Instead of opening a second issue, hope to see it migrated from qt5 to qt6 and wayland support. This should enable support for Cosmic desktop, Hyprland, etc.
Thanks, I will attempt to do it in coming days.
The PR https://github.com/keshavbhatt/ColorPicker/pull/28 allows compiling with Qt6. However, the "Pick Screen Color" button is missing on the Wayland session. For that, see https://bugs.kde.org/show_bug.cgi?id=479406 and https://bugreports.qt.io/browse/QTBUG-120957.
This is a limitation of Wayland stack, applications are not allowed to interact with other stuff on the desktop. It doesn't help that every compositor implements screenshots differently, Gnome has its own DBUS API, KDE its own, then there is https://wayland.app/protocols/wlr-screencopy-unstable-v1 from Sway and https://wayland.app/protocols/wlr-export-dmabuf-unstable-v1 from wlroots, but compositor must implement one of them. The color pickers are basically a screenshot plus a little extra.
As I understand from those bugs above, there is an implementation for Qt that uses XDG portals for Screenshots (both for Flatpak and regular desktop apps) but that doesn't work for me. I am on LXQt/labwc and I am using xdg-desktop-portal-lxqt so perhaps something is not implemented for my combo.
Perhaps is best to just wait for Qt to fix this, otherwise, this must be implemented specially for every compositor out there.
Ok, there is a nice list here https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces , so after installing xdg-desktop-portal-wlr now I can see the button, but it doesn't do anything. Not sure if this is related to labwc I am using, wlroots or whatever, but for me currently it will not work.
I guess that compiling with Qt6 should just work on Gnome and KDE but I don't have where to test.
Also, it is not possible to just force X via xwayland, i.e., with QT_QPA_PLATFORM=xcb the app will segfault when pressing button at QWindow::winId(), because Wayland windows don't have ids.