From 678bf57ed04b8c250f0bc031ebd264bece76e731 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 17 May 2023 21:36:58 -0400 Subject: gh-104499: IDLE - fix completions for tk aqua 8.7 (#104591) --- Lib/idlelib/autocomplete_w.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Lib/idlelib/autocomplete_w.py') diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py index 0f835a9cc1d..5bd7ce7f5e5 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 -- cgit v1.2.3