Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!lll-winken!sol.ctr.columbia.edu!emory!mephisto!prism!fsu!loligo!pepke From: pepke@loligo (Eric Pepke) Newsgroups: comp.sys.mac.programmer Subject: Re: Floating Windows Message-ID: <429@fsu.scri.fsu.edu> Date: 10 Jan 90 21:43:14 GMT References: <18786@bellcore.bellcore.com> Sender: news@fsu.scri.fsu.edu Reply-To: pepke@loligo.UUCP (Eric Pepke) Organization: Supercomputer Computations Research Institute Lines: 38 In article <18786@bellcore.bellcore.com> sdh@flash.UUCP (Stephen D Hawley) writes: >I need a pointer for making windows that float on top of the rest of the >world no matter what. I tried setting GostWindow to the window I wanted >on top, but that doesn't work. I want the kind of windows in FullPaint. > >Do i have to dick around with the window list pulling them in front >constantly? April 1988 MacTutor had a bit on this. I wouldn't do it exactly the way they did (and, in fact, I didn't) because, for one thing, Apple people have suggested that it would probably break. Most of the reason for this seems to have to do with accessing the Window Manager port directly to change the region where the drag window rectangle shows. There is no real trick, just a lot of special cases. Don't use GhostWindow. The first order solution is to keep a floating window on the top, put it on the top and never allow another window to come in front of it. This is relatively easy; don't use SelectWindow on a document window, but rather activate the window and bring it to just behind the rearmost floating window. The trickiness comes with desk accessory windows. You want the floating windows to be in front of all the application windows, but not in front of the desk accessory windows. I found that the easiest way to solve the problem was to think about all the special cases in the context of the structure of my main loop. What should happen when you bring up a desk accessory in front of the floating windows? What then should happen when you bring up a document window in front of that? Do you disallow that, as HyperCard does, or do you do it somewhat more cleverly? What window should be highlighted as active? (HyperCard does it stupidly.) Eric Pepke INTERNET: pepke@gw.scri.fsu.edu Supercomputer Computations Research Institute MFENET: pepke@fsu Florida State University SPAN: scri::pepke Tallahassee, FL 32306-4052 BITNET: pepke@fsu Disclaimer: My employers seldom even LISTEN to my opinions. Meta-disclaimer: Any society that needs disclaimers has too many lawyers.