summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/CallTipWindow.py
diff options
context:
space:
mode:
authorTony Lownds <tony@lownds.com>2002-09-23 01:04:05 (GMT)
committerTony Lownds <tony@lownds.com>2002-09-23 01:04:05 (GMT)
commit8b1b8d62a2eb8e3725e4c95429d8f0e7e3c13994 (patch)
tree29215fe1aab070242c70c9c31d66beb25a304682 /Lib/idlelib/CallTipWindow.py
parente555fc76a762a830ed067993fd6073bc69da123f (diff)
downloadcpython-8b1b8d62a2eb8e3725e4c95429d8f0e7e3c13994.zip
cpython-8b1b8d62a2eb8e3725e4c95429d8f0e7e3c13994.tar.gz
cpython-8b1b8d62a2eb8e3725e4c95429d8f0e7e3c13994.tar.bz2
Work around Mac OS X transient window issues
Diffstat (limited to 'Lib/idlelib/CallTipWindow.py')
-rw-r--r--Lib/idlelib/CallTipWindow.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
index 24af6b0..1542fe7 100644
--- a/Lib/idlelib/CallTipWindow.py
+++ b/Lib/idlelib/CallTipWindow.py
@@ -29,6 +29,14 @@ class CallTip:
self.tipwindow = tw = Toplevel(self.widget)
tw.wm_overrideredirect(1)
tw.wm_geometry("+%d+%d" % (x, y))
+ 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.
+ tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w,
+ "help", "noActivates")
+ except TclError:
+ pass
label = Label(tw, text=self.text, justify=LEFT,
background="#ffffe0", relief=SOLID, borderwidth=1,
font = self.widget['font'])