Skip to content

InputCapture support for session persistence#214

Open
whot wants to merge 14 commits intoflatpak:mainfrom
whot:wip/inputcapture-persistence
Open

InputCapture support for session persistence#214
whot wants to merge 14 commits intoflatpak:mainfrom
whot:wip/inputcapture-persistence

Conversation

@whot
Copy link
Copy Markdown
Contributor

@whot whot commented Jan 30, 2026

This is on top of @Jahdal's work from #208

See flatpak/xdg-desktop-portal#1898 for references to other components.

@whot
Copy link
Copy Markdown
Contributor Author

whot commented Jan 30, 2026

Note that this is missing a version check, it's not clear yet whether the new features are version 2 or 3 and we'll only need it for the latter case. And even if we don't have it, shoving the options in doesn't hurt so... meh?

edit: merged upstream as version 2 so no version check for 3 is needed

@whot
Copy link
Copy Markdown
Contributor Author

whot commented Mar 13, 2026

xdg-desktop-portal has merged support for this so we should be ready to go

@sithlord48
Copy link
Copy Markdown

@jadahl Is there anything holding this up or can we get this landed?

@KoljaFrahm
Copy link
Copy Markdown

Also according to the reactions, there are a lot of people waiting that this gets landed (+ a release after)
Can this be merged? :)

@whot
Copy link
Copy Markdown
Contributor Author

whot commented Mar 26, 2026

I've had another quick test (hoping it works) but I'm getting valgrind errors, please don't merge this yet.

edit: fix in #217

@KoljaFrahm
Copy link
Copy Markdown

Seems like the fix is merged, thank you!

@sithlord48
Copy link
Copy Markdown

Im looking forward to this if only to stop the almost daily AI generated PR's in deskflow to add this.

jadahl added 9 commits March 26, 2026 22:07
This will be necessary when handling signals, which needs to fetch the
session from a handle.
This adds API to interact with the clipboard portal associated with a
remote desktop session.
This makes the label not "fly away" when some other widget makes its
column wider.
Only starts the session and reports the shared devices and streams.
This allows copying to, and pasting from, the clipboard portal.
This makes it easier to construct a session from somewhere else, which
will be needed with CreateSession2().
It's its own thing, that also controls the lifetime of the actual
session, so need some special casing.
Rather useless, since we're not adding any barriers, but more complete
none the less.
In API version 2, the CreateSession() was replaced by
CreateSession2()/Start(); add API that corresponds to this.

Unfortunately applications will need to check whether this is supported
by manually checking the exposed API version, to use the new
construction method.
@whot whot force-pushed the wip/inputcapture-persistence branch from e2e7402 to ede09b0 Compare March 26, 2026 12:17
@whot
Copy link
Copy Markdown
Contributor Author

whot commented Mar 26, 2026

There's a little tool to test all this a bit easier now: https://github.com/whot/libportal-clipboard-test

And with #217 fixed valgrind is happy now, so this should be good to go.

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.

4 participants