Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 532eda4

Browse filesBrowse files
committed
Merge pull request #4144 from mdehoon/fixForIssue4142
Fix for issue 4142: Let show() exit the run loop after all windows are closed in a non-interactive session closes #4142
2 parents c412e2e + a36be44 commit 532eda4
Copy full SHA for 532eda4

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5241,6 +5241,16 @@ - (BOOL)closeButtonPressed
52415241
return YES;
52425242
}
52435243

5244+
- (void)close
5245+
{
5246+
[super close];
5247+
NSArray *windowsArray = [NSApp windows];
5248+
if([windowsArray count]==0) [NSApp stop: self];
5249+
/* This is needed for show(), which should exit from [NSApp run]
5250+
* after all windows are closed.
5251+
*/
5252+
}
5253+
52445254
- (void)dealloc
52455255
{
52465256
PyGILState_STATE gstate;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.