Skip to content

Commit 678bf57

Browse files
authored
pythongh-104499: IDLE - fix completions for tk aqua 8.7 (python#104591)
1 parent 7fc8e2d commit 678bf57

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Lib/idlelib/NEWS.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Released on 2023-10-02
44
=========================
55

66

7+
gh-104499: Fix completions for Tk Aqua 8.7 (currently blank).
8+
79
gh-104486: Make About print both tcl and tk versions if different,
810
as is expected someday.
911

Lib/idlelib/autocomplete_w.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,11 @@ def show_window(self, comp_lists, index, complete, mode, userWantsWin):
182182
self.userwantswindow = userWantsWin
183183
self.lasttypedstart = self.start
184184

185-
# Put widgets in place
186185
self.autocompletewindow = acw = Toplevel(self.widget)
187-
# Put it in a position so that it is not seen.
188-
acw.wm_geometry("+10000+10000")
189-
# Make it float
186+
acw.withdraw()
190187
acw.wm_overrideredirect(1)
191188
try:
192-
# This command is only needed and available on Tk >= 8.4.0 for OSX
193-
# Without it, call tips intrude on the typing process by grabbing
194-
# the focus.
189+
# Prevent grabbing focus on maxOS.
195190
acw.tk.call("::tk::unsupported::MacWindowStyle", "style", acw._w,
196191
"help", "noActivates")
197192
except TclError:
@@ -271,6 +266,7 @@ def winconfig_event(self, event):
271266
# place acw above current line
272267
new_y -= acw_height
273268
acw.wm_geometry("+%d+%d" % (new_x, new_y))
269+
acw.deiconify()
274270
acw.update_idletasks()
275271
except TclError:
276272
pass
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix completions for Tk Aqua 8.7 (currently blank).

0 commit comments

Comments
 (0)