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

Add API to wait for window close #254

Open
twavv opened this issue Apr 7, 2020 · 1 comment
Open

Add API to wait for window close #254

twavv opened this issue Apr 7, 2020 · 1 comment

Comments

@twavv
Copy link
Member

twavv commented Apr 7, 2020

Requested in #195

One option would be something like wait_closed(w::Window) (since wait(::Window) is defined to wait until the window is ready, i.e., electron is all started and the window has been initialized).

@mlhetland
Copy link

One option rather than wait_closed might be success. Now, when I look at the docs and source now, I can only find info about using it to run a process – I seem to recall I saw something about using it to wait for a process to finish (and to determine if it was successful), even if it was already started? At least that's how it seems to work. (Worth double-checking, I guess :-)

If that's the official behavior, it might be possible to treat the window as analogous to the process belonging to its shell, and to simply add a delegation:

Base.success(w::Window) = success(window.shell.proc)

(C.f., my post on Discourse.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants