mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-104499: IDLE - fix completions for tk aqua 8.7 (#104591)
This commit is contained in:
parent
7fc8e2d462
commit
678bf57ed0
3 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue