feat: handle input capture session persistence#9415
feat: handle input capture session persistence#9415whot wants to merge 1 commit intodeskflow:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
d7f30fb to
b824bd8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
b824bd8 to
36d0554
Compare
|
I pushed some updates here
|
36d0554 to
8419f3c
Compare
323fe86 to
78c37b4
Compare
|
@whot this should now be up to our standards. It also no longer breaks the build when libportal does not have the correct methods. If the portal side is not going to change IMHO we could land this as its "safe enough" if that will help you land the other parts faster. |
|
Thanks for the fixes, much appreciated. The big ticket item for the portal bits is the clipboard integration which requires more changes on the deskflow side than this. The inputcapture persistence bits are based on those so I recommend not merging until the clipboard is sorted. Oh, and getting clipboard support via portals into deskflow would go a long way towards validating the portal additions so they can actually be merged. 🐔, 🥚 etc. |
|
Honestly @whot if you can help w/ clipboard here that would be a MASSIVE help . We can add any if checks we need here to align w/ libportal and that way you can test a full stack |
whot
left a comment
There was a problem hiding this comment.
fwiw, to build errors I encountered
78c37b4 to
a71d481
Compare
|
Should both be fixed now. I no longer store the token as a member var |
This comment was marked as outdated.
This comment was marked as outdated.
|
Pushed a fixup comment on top for easier review - in my local setup I had CreateSession2 fail, crashing deskflow which could be construed as bad UX. |
c8668ed to
cf38696
Compare
|
Note: We don't "Squash" land or anything so when this is ready for review some one has to fix up that fixup. |
|
Will try to test as well as #9431 while I'm building all those libs.
Yeah we can worry about getting the commits perfect when it's time to land. |
|
Edit: wrong pr the comment was intended for #9431 |
You'll need to build and install it.
On GNOME, I'm also having to build latest:
Let me know if it's easier on KDE and I might test on my Arch laptop as Wayland server. |
|
On kde the portal backend has a pr somewhere I think.. ( this will likey be used to test it on the kde side also ) |
cf38696 to
e45f9bc
Compare
|
Updated and squashed the 'fixup' commit into the first one. |
e45f9bc to
7d113b8
Compare
|
@whot any idea if libportal-next will contain both this and the clipboard or only the clipboard ? trying to figure out if i this should be rebased on the changes needed for the clipboard or not. |
|
it'll all depend on when flatpak/xdg-desktop-portal#1898 gets pulled. Once that one is in, libportal will follow likely immediately |
a22433a to
2548967
Compare
|
@whot can you ping me when the methods used here are not going to change so we can land this part. |
Use the new libportal API to start a CreateSession2, then set the session persistence and read/write the tokens as required. This allows us to start a server without a permission dialog - provided the portal supports it and the user is ok with that.
2548967 to
a413d30
Compare
Description
Use the new libportal API to start a CreateSession2, then set the session persistence and read/write the tokens as required. This allows us to start a server without a permission dialog - provided the portal supports it and the user is ok with that.
See flatpak/xdg-desktop-portal#1898 for a list of components/branches/mrs that are required to get this working, you will need libportal, xdg-desktop-portal-gnome and xdg-desktop-portal.
Disclosure of AI use
Google Gemini was asked for how to read/write a string to a file with Qt, see the helper functions.
Related Issue
#8032
fixes: #9599
How Has This Been Tested?
This assumes a Fedora 43 box, adjust as required
The updated dialog has a checkbox for rememberin the permission which gets stored in
XDG_STATE_HOME/deskflow/restore-token.txtand next time that token will be re-used (if allowed) and deskflow-server no longer requires the user interaction.This is a Draft PR. I won't have time to finish it and polish it but all the pieces are there so it can be picked up and integrated correctly (esp. the token read/write). So any volunteers, please take this!
It's backwards-compatible to the current portals (I hope, haven't tested :)
Edit, Sithlord48
Settings::Server::XdpRestoreTokenconfiguration.mdthe new settingWaiting on flatpak/libportal#214 to land