]> granicus.if.org Git - python/commitdiff
Work around Mac OS X transient window issues
authorTony Lownds <tony@lownds.com>
Mon, 23 Sep 2002 01:04:05 +0000 (01:04 +0000)
committerTony Lownds <tony@lownds.com>
Mon, 23 Sep 2002 01:04:05 +0000 (01:04 +0000)
Lib/idlelib/CallTipWindow.py

index 24af6b0e46b734d8026ade37102364025944479b..1542fe7cff4ccb82f709ec466b01442fd6d88086 100644 (file)
@@ -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'])