-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make KDE use Freedesktop portal #2495
Make KDE use Freedesktop portal #2495
Conversation
Couple of questions since I'm having trouble testing on wayland right now.
|
No :) It just takes the screenshot without asking. Out of curiosity I've been looking at the source code of xdg-desktop-portal and this is how it seems to work:
It looks like the most recent "consensus" is to move to the Freedesktop interface, which is considered "the way to go in the future" (or, at least, that's what they end up doing in Gimp's screenshot tool): Notice, however, that at the end they still kept the KDE portal in case the Freedesktop one failed (instead of completely dropping it). Something similar could be done here... or not, considering the Freedesktop portal should be available in all except very old distros. |
Thanks for documenting all that! It's really helpful to have it all summarized here. Since this code path only is activated on Wayland, it makes sense to me to just use the Freedesktop implementation. If users are on old distros they are likely using X11. @mmahmoudian any objections before I merge this? |
Well, in spite of my preference on being on the latest version of software, we should see which if the functionality breaks in major KDE-based point-based release distros i.e kubuntu, Fedora KDE spin. I will try these two distros today and will report back. One question that comes to mind is that of this backwards compatibility can be mitigated by using Flatpak or Snap. In general I have no objections and I support the cause, but we should identify which major popular distros will break and we create a clear announcement to avoid confusion and avalanche of new bug reports. |
Thanks I tested this on Fedora36 beta and this change is required. |
This also worked on Arch, but importantly I had to uninstall gnome first. There was some conflict while having the xdg portals of both gnome and kde installed at the same time. |
(cherry picked from commit 3cd2dec)
This fixes #2436
It looks like in the newest KDE, using the Fredesktop portal is the only way that works (at least that seems to be the case with Fedora 35, where I have tested this change).
Having said so... it could be that this ticket breaks compatibility with older versions of KDE (after all, the special KDE code this PR is replacing was originally put in there for a reason!).
So... there are two options here: either merge this PR and forget about backwards compatibility or create a more sofisticated logic which (for the KDE case) tries with different approaches until one succeeds (KDE Screenshot / KDE Screenshot2 / Freedesktop / ...).
I'm not personally a fan of looking backwards... but you decide :)
After this change, all 3 supported desktops (GNOME, KDE and Sway) use the Freedesktop portal... and I suppose we could even go as far as dropping the Desktop check from this function and always try to use the Freedesktop portal as this will probably also work with others.