[Python-checkins] cpython (2.7): Issue #24889: When starting Idle, force focus onto Idle window if not already

terry.reedy python-checkins at python.org
Mon Sep 7 07:59:40 CEST 2015


https://hg.python.org/cpython/rev/741b033c5290
changeset:   97737:741b033c5290
branch:      2.7
parent:      97716:6c222848badd
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Mon Sep 07 01:58:05 2015 -0400
summary:
  Issue #24889: When starting Idle, force focus onto Idle window if not already
there (as when opening Idle from interactive Python on Windows).

files:
  Lib/idlelib/PyShell.py |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1054,6 +1054,7 @@
             nosub = "==== No Subprocess ===="
         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?

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list