-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Access window size on closing #573
Comments
This is clearly a bug. The code invoked by |
Good to know. Thanks for looking into it. I wasn't sure if I was misunderstanding something, or if it was a bug. Is there a good way to save the window shape on closing until this is fixed, or am I better off just waiting? |
I will try to fix this asap. Meanwhile the best course solution would be periodically save window dimensions somewhere and read the final value on window closing. Stupid, but it should work. |
@mrzv |
Thanks! |
PR here #575 |
I should probably mention that I had the same deadlock, when I tried to read the shape of the window from |
c0ba525 fixed |
Getting window properties on window.closed doesn’t make any sense, as the window does not longer exist. It should not cause a deadlock though.
|
Specification
Description
I'm new to pywebview, and I'm trying to figure out the right way to do the following. I'd like to save the shape of the window (width and height), when the window is closed or closing. The problem is that when I try to do this from a callback (added to
window.closing
), everything hangs. I think there is a deadlock somewhere, but I don't quite understand the design.What's the right way to do this?
I can access width and height from the function
f
I pass towebview.start(f, window)
, but that doesn't solve the issue of how to trigger this logic when the window is closing.The text was updated successfully, but these errors were encountered: