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

unneeded session_id? #1310

Open dcz-self opened 6 months ago

dcz-self commented 6 months ago

Operating System

n/a

XDG Desktop Portal version

Git

XDG Desktop Portal version (Other)

No response

Desktop Environment

Deepin

Desktop Environment (Other)

No response

Expected Behavior

Docs describe things that are in use/applicable.

Current Behavior

Docs for the impl of CreateSession for some portals describe a "session_id" which serves no clear purpose.

It doesn't seem to be the same as the session handle, and the impl doesn't need to return that anyway. xdg-desktop-portal sources don't make use of that return value.

Is that field a nonexistent phantom coming from some copy-paste error?

Steps to Reproduce

  1. Go to https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.impl.portal.InputCapture.html#org-freedesktop-impl-portal-inputcapture-createsession or https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.impl.portal.GlobalShortcuts.html#org-freedesktop-impl-portal-globalshortcuts-createsession
  2. Scroll down to the results vardict
  3. Notice session_id

Anything else we should know?

No response

whot commented 6 months ago

Yeah, looks like a copy/paste from the ScreenCast portal - this should be session_handle instead which is returned in the results. Mind filing a PR for this? (and ScreenCast and GlobalShortcuts)

dcz-self commented 6 months ago

Should this actually be session_handle rather than nothing? IN session_handle o, is already passed by the caller, so is there a point returning it again?

whot commented 6 months ago

Can you check if any of the impls actually return this (see ScreenCast and others too)? This looks much like a copy-paste from the .portal where the client passes the token and the portal returns the handle. Since it's the impl this isn't needed here (iirc, I've paged parts of all this out) so it could be dropped.

dcz-self commented 6 months ago

On Mon, 25 Mar 2024 03:57:57 -0700 Peter Hutterer @.***> wrote:

Can you check if any of the impls actually return this (see ScreenCast and others too)? This looks much like a copy-paste from the .portal where the client passes the token and the portal returns the handle. Since it's the impl this isn't needed here (iirc, I've paged parts of all this out) so it could be dropped.

I'm not seeing any session_ids in the impls provided by xdg-desktop-portal-gnome.