Skip to content

ScreenCast: follow spec naming#191

Merged
leolost2605 merged 1 commit into
elementary:mainfrom
garaevdi:xdp1.21-fix
Jun 8, 2026
Merged

ScreenCast: follow spec naming#191
leolost2605 merged 1 commit into
elementary:mainfrom
garaevdi:xdp1.21-fix

Conversation

@garaevdi

@garaevdi garaevdi commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

tl;dr: follow x-d-p spec

Long version: By default vala translates dbus members from snake case to pascal case, and that's totally ok for most of the time. But this behavior bites us here since x-d-p expects version property to be lowercase. Before x-d-p 1.21 it wasn't an issue because they've set their version independently from us. But now they conditionally bind portal's properties to implementations (us). Since cursor capture was added with version 2, this all caused a mismatch of properties and confusion of clients, because we were reporting correct AvailableCursorModes but portal didn't know about this assuming we "supported" old version of the spec.

tl;dr: follow x-d-p spec

Long version: By default vala translates dbus members from snake case to
pascal case, and that's totaly ok for most of the time. But this
behaviour bites us here since x-d-p expects `version` property to be
lowercase. Before x-d-p 1.21 it wasn't an issue because they've set
their version independently from us. But now they conditionally bind
portal's properties to implementations (us). Since cursor capture was
added with version 2, this all caused a missmatch of properties and
confusion of clients, because we were reporting correct
`AvailableCursorModes` but portal didn't know about this assuming we
"supported" old version of the spec.
@ryonakano
ryonakano requested a review from a team June 6, 2026 14:24
@stsdc

stsdc commented Jun 6, 2026

Copy link
Copy Markdown
Member

Hi @garaevdi Could You drop a link to the spec?

@garaevdi

garaevdi commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @garaevdi Could You drop a link to the spec?

Sure
XML definition: https://github.com/flatpak/xdg-desktop-portal/blob/c6f217875485e28799a524b643c34474a289ba4f/data/org.freedesktop.portal.ScreenCast.xml#L316
Online documentation: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.impl.portal.ScreenCast.html#org-freedesktop-impl-portal-screencast-version

Also screenshot portal does the same thing:

[DBus (name = "version")]
public uint32 version { get; default = 2; }

@leolost2605
leolost2605 merged commit e66361b into elementary:main Jun 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants