Skip to content

Fix for issue 4142: Let show() exit the run loop after all windows are closed in a non-interactive session #4144

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

Merged
merged 1 commit into from
Feb 22, 2015

Conversation

mdehoon
Copy link
Contributor

@mdehoon mdehoon commented Feb 22, 2015

See issue 4142. Currently show() does not exit after all windows have been closed. The relevant code was in src/_macosx.m, but was inadvertently lost in pull request 4006. This bug fix checks the number of windows remaining after closing one window, and calls [NSApp stop: self] if there are no more windows.
One open question is how Python show respond to keyboard interrupts (ctrl-c) while show() is running. Currently ctrl-c does nothing (other than printing ctrl-c to the screen). I guess it would make sense for ctrl-c to cause show() to exit.

…n exit [NSApp run] after all windows have been closed. This is needed for show() to exit the run loop in non-interactive sessions.
@tacaswell tacaswell added this to the next point release milestone Feb 22, 2015
@cimarronm
Copy link
Contributor

looks good here

tacaswell added a commit that referenced this pull request Feb 22, 2015
Fix for issue 4142: Let show() exit the run loop after all windows are closed in a non-interactive session

closes #4142
@tacaswell tacaswell merged commit 532eda4 into matplotlib:master Feb 22, 2015
@mdehoon mdehoon deleted the fixForIssue4142 branch February 23, 2015 06:24
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.

3 participants