Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] gh-104499: IDLE - fix completions for tk aqua 8.7 (GH-104591) #104596

Merged
merged 1 commit into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/idlelib/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 3 additions & 7 deletions Lib/idlelib/autocomplete_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,11 @@ def show_window(self, comp_lists, index, complete, mode, userWantsWin):
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:
Expand Down Expand Up @@ -271,6 +266,7 @@ def winconfig_event(self, event):
# 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix completions for Tk Aqua 8.7 (currently blank).