[Idle-dev] CVS: idle CallTipWindow.py,1.4,1.5

Tony Lownds tonylownds@users.sourceforge.net
Sun, 22 Sep 2002 18:04:07 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv11447

Modified Files:
	CallTipWindow.py 
Log Message:
Work around Mac OS X transient window issues

Index: CallTipWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/CallTipWindow.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** CallTipWindow.py	15 Sep 2002 21:43:13 -0000	1.4
--- CallTipWindow.py	23 Sep 2002 01:04:05 -0000	1.5
***************
*** 30,33 ****
--- 30,41 ----
          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,