InputCapture support for session persistence#214
Conversation
|
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 |
008ccb0 to
ccce6f6
Compare
ab7ca0b to
e2e7402
Compare
|
xdg-desktop-portal has merged support for this so we should be ready to go |
|
@jadahl Is there anything holding this up or can we get this landed? |
|
Also according to the reactions, there are a lot of people waiting that this gets landed (+ a release after) |
|
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 |
|
Seems like the fix is merged, thank you! |
|
Im looking forward to this if only to stop the almost daily AI generated PR's in deskflow to add this. |
e2e7402 to
ede09b0
Compare
|
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. |
|
|
||
| if (call->session->restore_token) | ||
| g_variant_builder_add (&options, "{sv}", "restore_token", | ||
| g_variant_new_string (call->session->restore_token)); |
There was a problem hiding this comment.
Should this do a version check on the portal first? The clipboard one doesn't, but it also is just a request method that may fail, so it's harmless to do without checking the version. Here one would have to avoid setting these for older versions since otherwise the request I assume would fail.
There was a problem hiding this comment.
done (as follow-up to make it easier to review), and I added a bunch of test cases too
|
Should the methods names here be considered "final" ? |
You mean they can't be renamed? I'd consider them final once the pull request lands and there is a release; before that things not yet added can be renamed. |
After this lands is there a plan for release ? |
That be a sensible thing to do at least. |
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.
This will allow enabling clipboard integration later.
If the caller hasn't queried the version yet do so before we call into start_session. This is required for correctly sending the restore_token option which we may only send if the version is >= 2.
Our existing tests are derived from dbusmock.DBusTestCase which uses the unittest framework, preventing us from using pytest parameterization. So duplicate the tests for legacy and new approach until that architecture is fixed. And then add a few new tests for session persistence. Co-Authored-by: Claude Code <noreply@anthropic.com>
ede09b0 to
e200035
Compare
|
LGTM |
|
The PR is tested and approved, so can you merge it? |
|
Tagging @smcv (Simon) who was instrumental in last version release. Are we good to go for another release? If not, what is missing / required? |
This is on top of @Jahdal's work from #208
See flatpak/xdg-desktop-portal#1898 for references to other components.