flatpak / xdg-desktop-portal

Desktop integration portal
https://flatpak.github.io/xdg-desktop-portal/
GNU Lesser General Public License v2.1
572 stars 188 forks source link

Optional information actually required in GlobalShortcuts::CreateSession #1314

Open dcz-self opened 6 months ago

dcz-self commented 6 months ago

Operating System

Fedora 38

XDG Desktop Portal version

1.18

XDG Desktop Portal version (Other)

No response

Desktop Environment

KDE

Desktop Environment (Other)

No response

Expected Behavior

Contents of options parameter described as "optional further information" in https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.GlobalShortcuts.html#org-freedesktop-portal-globalshortcuts-createsession are not optional for a successful call.

Current Behavior

Call errors out unless both session_handle_token and handle_token are present: org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code0: Missing token.

dbus-monitor log:

method call time=1711192202.821524 sender=:1.1659 -> destination=:1.64 serial=8 p
ath=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.GlobalShort
cuts; member=CreateSession
   array [
   ]
error time=1711192202.824365 sender=:1.64 -> destination=:1.1659 error_name=org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code0 reply_serial=8
   string "Missing token"

Steps to Reproduce

  1. Download https://gitlab.gnome.org/dcz/portal-poker/-/commit/e8e92aaab902a1c80885db2d6498669051973751
  2. Run ./portal-poker.py portal GlobalShortcuts CreateSession

Anything else we should know?

No response

matthiasclasen commented 3 months ago

Yeah, that documentation is misleading. It was probably copied from the screencast portal, where sessions made a first appearance.