]> granicus.if.org Git - python/commitdiff
Issue #24889: When starting Idle, force focus onto Idle window if not already
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 7 Sep 2015 05:58:13 +0000 (01:58 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Mon, 7 Sep 2015 05:58:13 +0000 (01:58 -0400)
there (as when opening Idle from interactive Python on Windows).

Lib/idlelib/PyShell.py

index 5854cf91a4043cbb658ff850dba46b467fdae499..90fc689e9dda18a7d6e038713f06ab7064d5c021 100755 (executable)
@@ -1043,6 +1043,7 @@ class PyShell(OutputWindow):
 
         self.write("Python %s on %s\n%s\n%s" %
                    (sys.version, sys.platform, self.COPYRIGHT, nosub))
+        self.text.focus_force()
         self.showprompt()
         import tkinter
         tkinter._default_root = None # 03Jan04 KBK What's this?