Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rutgers!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: window madness Message-ID: <3143@ilium.cs.swarthmore.edu> Date: 3 Oct 89 20:42:36 GMT References: <2485@dogie.macc.wisc.edu> Reply-To: jackiw@ilium (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 28 In article <2485@dogie.macc.wisc.edu> yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) writes: > For reasons too involved to bother you with, I will want the > selection rect to not be confined to the window's clipping > region. I want the user to allow this "selection rect" to > be drawn anywhere on the screen, on top of the desktop, > everthing! > >>> Internet: yahnke@macc.wisc.edu <<< 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. Note that drawing in the WMgrPort is officially forbidden. If you do it entirely in XOR, winding up with the same screen you started with, and *don't return to your event loop* before finishing, you can probably get away with it though. (During your event loop, Multifinder or a DA or the Notification Manager might do some window drawing of their own and screw up your XORing and your screen picture.) -- _ _|\____ Nick Jackiw | Visual Geometry Project | Math Department / /_/ O> \ ------------+-------------------------+ Swarthmore College | O> | 215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081 \_Guernica_/ ------------+-------------------------+ USA