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

[screenshot] destroy request when done #82

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nullobsi
Copy link

@nullobsi nullobsi commented Feb 2, 2021

destroy the request when it's finished.

  • fixes issue where a single application requesting multiple screenshots does not work

- fixes issue where application requesting multiple screenshots does not work
@emersion
Copy link
Owner

emersion commented Feb 2, 2021

I wonder if that's the right thing to do. Right now xdpw_request_destroy is only called from the Close method handler, and multiple screencast sessions work properly. Are you sure it's not a bug in your client?

@nullobsi
Copy link
Author

nullobsi commented Feb 2, 2021

according to the spec, Close should be called to cancel the request and close all dialogs associated with the request. I tried calling close from the client, but it never got rid of the object path. Trying to call the screenshot again led to it trying to set the vtable on an already existing object, and failing.

@emersion
Copy link
Owner

emersion commented Feb 3, 2021

What if the client calls Close, but at the same time xdpw destroys the object? This seems racy.

@nullobsi
Copy link
Author

nullobsi commented Feb 3, 2021

Close is meant to abort the request. The spec says that after calling close, a Response signal will not be emitted. I don't know how the other desktop portals handle this, though.

@nullobsi
Copy link
Author

nullobsi commented Feb 3, 2021

xdg-desktop-portal-gtk gets rid of the Request object path even if Close is not called.

@nullobsi
Copy link
Author

nullobsi commented Mar 5, 2021

while this does seem to be a client program issue (must use token to ensure unique object path,) it doesn't make sense for such an object to persist even beyond the application closing. In fact, calling Close() does not even work-- xdg-desktop-portal destroys its proxy object before the program gets a chance to call it.

@danshick
Copy link
Collaborator

danshick commented Apr 30, 2021

subscribe

@dmayle
Please use the notification feature rather than spamming the comments.

Repository owner deleted a comment from dmayle Apr 30, 2021
@WhyNotHugo
Copy link

The same issue seems to exist for screencasts, a bunch of /org/freedesktop/portal/desktop/request/1_2191/webrtcXXXXXXX are left behind too.

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.

None yet

4 participants