Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!bionet!agate!wish-bone!lippin From: lippin@wish-bone.berkeley.edu (The Apathist) Newsgroups: comp.sys.mac.programmer Subject: Re: window madness Message-ID: <1989Oct4.184445.4500@agate.berkeley.edu> Date: 4 Oct 89 18:44:45 GMT References: <2485@dogie.macc.wisc.edu> <3143@ilium.cs.swarthmore.edu> Sender: usenet@agate.berkeley.edu (USENET Administrator;;;;ZU44) Reply-To: lippin@math.berkeley.edu Organization: Authorized Service, Incorporated Lines: 28 Recently jackiw@ilium (Nick Jackiw) wrote: >You can use GetWMgrPort (WindowManager chapter, IM-1) to get a GrafPtr to >the window-manager port, which contains all visible screen real estate >(or multiple screen realty, if you have the luxury). Then you'd SetPort to >this before drawing, and repeatedly (WMgr)LocalToGlobal and GlobalTo(your- >port)Local coordinates between the two ports. A number of very strange occurances while trying this sort of thing have convinced that Apple means it when they say "If you touch the window manager port, you die." A safer way is to make your own port, using OpenPort. This gives you the whole screen to play with, and you don't have to worry about the system depending on the port's fields in some obscure way. Again, do put the screen back the way you found it before letting other programs get any time; they aren't expecting to have their windows stomped on. Finally, there is a tech note on this subject; it would be best to read it before trying any of this. --Tom Lippincott lippin@math.berkeley.edu "Thank you for observing all saftey precautions." --Dark Star