From 83d725b1d297c21ca5e8ad78f8b4b3f4b129a9a5 2017-01-13 12:28:34 From: Min RK Date: 2017-01-13 12:28:34 Subject: [PATCH] Backport PR #10150: Always run the OS X loop even if no windows. Otherwise this can trigger infinite Python-Icon-In-Dock bouncing. See 10137. I will guess that this is because application on OS X may not have windows and still need to process events. It may be that an alternative is to run the loop only once the first time, but I'm unsure. ---- Ping minrk : I have no clue what I am doing. --- diff --git a/IPython/terminal/pt_inputhooks/osx.py b/IPython/terminal/pt_inputhooks/osx.py index efa8854..53f4e38 100644 --- a/IPython/terminal/pt_inputhooks/osx.py +++ b/IPython/terminal/pt_inputhooks/osx.py @@ -127,12 +127,6 @@ def _stop_on_read(fd): def inputhook(context): """Inputhook for Cocoa (NSApp)""" NSApp = _NSApp() - window_count = msg( - msg(NSApp, n('windows')), - n('count') - ) - if not window_count: - return _stop_on_read(context.fileno()) msg(NSApp, n('run')) if not _triggered.is_set():