summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-18 02:02:53 (GMT)
committerGitHub <noreply@github.com>2023-05-18 02:02:53 (GMT)
commite96fb399c11fdd0e9698ee44c33fe5d08def4977 (patch)
treeddff7503a097b016bc672caaf7ad4cd8590faf24 /Lib/idlelib
parenta8fc8b7e81e1e830771758a00312b7cea2803085 (diff)
downloadcpython-e96fb399c11fdd0e9698ee44c33fe5d08def4977.zip
cpython-e96fb399c11fdd0e9698ee44c33fe5d08def4977.tar.gz
cpython-e96fb399c11fdd0e9698ee44c33fe5d08def4977.tar.bz2
[3.11] gh-104499: IDLE - fix completions for tk aqua 8.7 (GH-104591) (#104596)
gh-104499: IDLE - fix completions for tk aqua 8.7 (GH-104591) (cherry picked from commit 678bf57ed04b8c250f0bc031ebd264bece76e731) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/NEWS.txt2
-rw-r--r--Lib/idlelib/autocomplete_w.py10
2 files changed, 5 insertions, 7 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 8e8e6c3..89e86c1 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -4,6 +4,8 @@ Released after 2022-10-24
=========================
+gh-104499: Fix completions for Tk Aqua 8.7 (currently blank).
+
gh-104486: Make About print both tcl and tk versions if different,
as is expected someday.
diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py
index 0f835a9..5bd7ce7 100644
--- a/Lib/idlelib/autocomplete_w.py
+++ b/Lib/idlelib/autocomplete_w.py
@@ -182,16 +182,11 @@ class AutoCompleteWindow:
self.userwantswindow = userWantsWin
self.lasttypedstart = self.start
- # Put widgets in place
self.autocompletewindow = acw = Toplevel(self.widget)
- # Put it in a position so that it is not seen.
- acw.wm_geometry("+10000+10000")
- # Make it float
+ acw.withdraw()
acw.wm_overrideredirect(1)
try:
- # This command is only needed and available on Tk >= 8.4.0 for OSX
- # Without it, call tips intrude on the typing process by grabbing
- # the focus.
+ # Prevent grabbing focus on maxOS.
acw.tk.call("::tk::unsupported::MacWindowStyle", "style", acw._w,
"help", "noActivates")
except TclError:
@@ -271,6 +266,7 @@ class AutoCompleteWindow:
# place acw above current line
new_y -= acw_height
acw.wm_geometry("+%d+%d" % (new_x, new_y))
+ acw.deiconify()
acw.update_idletasks()
except TclError:
pass