8000 Window should be always be closed immediately when the 'x' is clicked · Issue #62 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Window should be always be closed immediately when the 'x' is clicked #62

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

Closed
nathansobo opened this issue Aug 21, 2013 · 4 comments · Fixed by #130
Closed

Window should be always be closed immediately when the 'x' is clicked #62

nathansobo opened this issue Aug 21, 2013 · 4 comments · Fixed by #130

Comments

@nathansobo
Copy link

When a window is running an unresponsive script (for example, something that is infinitely looping), it would be nice if we could still click the red 'x' icon to close the window and forcibly terminate the render process.

@aroben
Copy link
Contributor
aroben commented Aug 21, 2013

A strategy I've used elsewhere is to hide the window immediately when the X is clicked, then give the renderer 2 seconds to close the window for real. If it takes longer than 2 seconds, then the browser forces the window to close.

@nathansobo
Copy link
Author

That's a great idea.

@zcbenz
Copy link
Contributor
zcbenz commented Aug 23, 2013

Atom-shell needs to ask the renderer whether the window can be closed when the X is clicked, so simply hide the window does not work. For example, the "confirm close" dialog in Atom can cancel the close, if we hide the window the dialog would not be seen by users.

I think when the X is clicked, we can check whether the window has been unresponsive for a while (for example 2 seconds), if it does Atom can show the "renderer is unresponsive" dialog and let the user decide whether to wait or force closing it. Simply terminating the renderer could surprise the users, because they may be expecting a "confirm close" dialog but the window just closes. Does this solution work for you?

@nathansobo
Copy link
Author

Perfect.

kevinsawicki pushed a commit that referenced this issue May 9, 2017
Some tweaks on making application looks better
kevinsawicki pushed a commit that referenced this issue May 9, 2017
Some tweaks on making application looks better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
0