-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screenshot permission, attempt 2 #853
Merged
GeorgesStavracas
merged 7 commits into
flatpak:main
from
GeorgesStavracas:gbsneto/screenshot-permission-for-review
Aug 10, 2022
Merged
Screenshot permission, attempt 2 #853
GeorgesStavracas
merged 7 commits into
flatpak:main
from
GeorgesStavracas:gbsneto/screenshot-permission-for-review
Aug 10, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No functional changes, but will facilitate future patches.
Next commit will introduce a permission query for screenshots, so prepare for that by moving some of the code to a thread job.
This will be used by the Screenshot call to query the permissions of the application for screenshotting.
Merged
I reviewed the code and it looks good to me, thanks Georges! |
99183d3
to
a99cb62
Compare
jadahl
reviewed
Aug 10, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just a minor leak spotted
a99cb62
to
3f6e76f
Compare
jadahl
reviewed
Aug 10, 2022
3f6e76f
to
12ff0c8
Compare
jadahl
reviewed
Aug 10, 2022
12ff0c8
to
df8b033
Compare
jadahl
reviewed
Aug 10, 2022
jadahl
reviewed
Aug 10, 2022
This commits makes the screenshot portal request a permission using the the access portal when a non-interactive screenshot is requested. This should be enough to let applications request permissions once, and be forever able to screenshot without much hassle. Add a new 'version' property to the Screenshot implementation D-Bus interface, and check if the implementation reports at least version = 2 before requesting the screenshot permission. Fixes flatpak#649
Trivial, but helps debugging it.
Noticed while reading reference code for the screenshot changes. It's good hygiene to protect against this failure.
Spotted during review of the screenshot changes, which are basically a copy of this code.
df8b033
to
64130e2
Compare
lgtm |
Thanks @robert-ancell and @jadahl |
Is anything changing for the caller or does this affects only the internal implementation of the portal? |
Thanks a lot! :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a new permission table and value for screenshots, which allows portal implementations to skip the sharing dialog.
Closes #649