Skip to content
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

Dialog improvements #96

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Dialog improvements #96

wants to merge 6 commits into from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 14, 2024

May as well create a PR for some changes I've been working on, but more (larger) changes will be added later.

Apparently the access portal should be used for non-interactive screenshots, but that doesn't currently happen since version isn't advertised properly. That will also require the change from #88, and fixing up the view of the access dialog.

Not done yet (in the initial version of this PR):

  • Make sure cancelling a request closes any dialog related to that request, for all dialogs
  • Clean up and de-duplicate some of the dialog related code now that we have multiple dialogs
  • Fix the access dialog
  • Figure out how to handle portal requests to create a dialog when another dialog is open
    • Does xdg-desktop-portal handle this for us? What do other portals do?

@ids1024
Copy link
Member Author

ids1024 commented Sep 26, 2024

I see on Gnome:

  • Cancelling a screeshot Session doesn't close the screenshot interface
  • If two clients request screenshots at the same time, the screenshot UI is shown once, and both clients get the same file path
    • Maybe fine? But seems odd.

So I'm not sure if looking at existing implementations helps with finding the best way to handle this.

ids1024 and others added 6 commits November 15, 2024 15:16
This avoids funny destructor code, and allows the cancellation handling
code to use async.
It is unnecessarily complicated to implement this manually. Just derive,
and any custom implementation can be done in individual structs.
Add in the zbus interface name org.freedesktop.impl.portal.Access
The previous layout was broken and unusable. This now makes the access
portal as used for non-interactive screenshots usable.

Screenshots don't seem to use `access_choices`. That still needs
testing.
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.

2 participants