Summary: | KDE file chooser portal can't be hidden programmatically, but it can in GNOME | ||
---|---|---|---|
Product: | [Plasma] xdg-desktop-portal-kde | Reporter: | Emilio Cobos Álvarez (:emilio) <emilio> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED MOVED | ||
Severity: | normal | CC: | aleixpol, emilio, jgrulich, nate, nicolas.fella |
Priority: | NOR | ||
Version: | git-stable-Plasma/5.27 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Example program.
Gtk4 program that works. |
Description
Emilio Cobos Álvarez (:emilio)
2023-11-24 20:23:11 UTC
Ah, I was pointed out in the GitHub issue that this is, indeed defined in https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html#org-freedesktop-portal-request-close So it is a bug in the KDE portal impl after all. What version of Plasma are you testing? As far as I can tell this should work since Plasma 5.25 (https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/90) (In reply to Nicolas Fella from comment #2) > What version of Plasma are you testing? As far as I can tell this should > work since Plasma 5.25 > (https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/90) KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.112.0 Qt Version: 5.15.11 Kernel Version: 6.6.2-arch1-1 (64-bit) Graphics Platform: Wayland A coworker of mine could repro on Fedora as well, though not sure the exact version. Created attachment 163443 [details]
Example program.
Build with:
gcc $(pkg-config --cflags --libs gtk+-3.0) hello-world.c -o hello-world
Run with:
GTK_USE_PORTAL=1 ./hello-world
And click the button.
ER: KDE file picker appears, then disappears in 3 seconds.
AR: File picker stays open.
Created attachment 163445 [details]
Gtk4 program that works.
Hmm, sorry, this does work. I think it's a gtk3 bug and I must have mistested in GNOME.
Running your example and dbus-monitor I get method call time=1700873953.362815 sender=:1.1276 -> destination=org.freedesktop.portal.Desktop serial=97 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.FileChooser; member=Close object path "/org/freedesktop/portal/desktop/request/1_1276/gtk458574415" method call time=1700873953.362947 sender=:1.1276 -> destination=org.freedesktop.DBus serial=98 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch string "type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writer/user',arg0path='/org/gtk/settings/file-chooser/'" method return time=1700873953.362985 sender=org.freedesktop.DBus -> destination=:1.1276 serial=4294967295 reply_serial=98 error time=1700873953.363167 sender=:1.27 -> destination=:1.1276 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=97 string "No such method “Close”" so yes, it looks like the app is doing something not right (In reply to Emilio Cobos Álvarez (:emilio) from comment #5) > Created attachment 163445 [details] > Gtk4 program that works. > > Hmm, sorry, this does work. I think it's a gtk3 bug and I must have > mistested in GNOME. Indeed, that works for me too Yeah, they seem to be sending the request to the wrong interface. https://gitlab.gnome.org/GNOME/gtk/-/blob/65b0c289b03680b825101b68a5c4b11e99e31b43/gtk/gtkfilechoosernativeportal.c#L189 Should be "org.freedesktop.portal.Request". Will file there. Thanks (In reply to Nicolas Fella from comment #7) > Indeed, that works for me too Hah, this _seems_ to work, but actually doesn't. But I still think it's not KDE's fault... https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6613 for GTK4 (which suffered from a slightly different issue) |