Xref: utzoo comp.sys.amiga.tech:3475 comp.sys.amiga:28489 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!ncr-sd!crash!pnet01!billk From: billk@pnet01.cts.com (Bill W. Kelly) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: FixReq -- a FIX for NAUGHTY PROGRAMS that don't set pr_WindowPtr Message-ID: <3770@crash.cts.com> Date: 28 Jan 89 03:56:15 GMT Sender: news@crash.cts.com Organization: People-Net [pnet01], El Cajon CA Lines: 43 ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes: >In article <3747@crash.cts.com> billk@pnet01.cts.com (Bill W. Kelly) writes: >>There are many programs that open custom screens; there are few programs that >>set pr_WindowPtr to point to their window. [ ... ] >> >>FixReq solves this problem by patching AutoRequest() to substitute >>IntuitionBase->ib_ActiveWindow in place of whatever window pointer was passed >>to AutoRequest(). >> > JimM will probably toast you for this. > > What happens if the Window pointed to by ib_ActiveWindow goes away >while you're still busy putting up the requester? Your task could switch >out just long enough for the active Window's owner to CloseWindow() it out >from under your feet. This is Very Bad. > > Also, LockIBase() won't help you here. In order to keep the Window >from going away, you have to hold on to the IntuitionBase lock long enough >to get your AutoRequester up. However, in order to get the AutoRequester >up, Intuition needs to lock IntuitionBase. Deadlock. Also Very Bad. > >>It works nicely. >> > I'll bet it will break in a big way if you stress-test it. > > Caveat Emptor. > Oh, come on. First of all, AutoRequest() (or: BuildSysRequest()) doesn't put up a requester in the _window_ you give it, but in the windows' screen! Now, the screen could be closed while the AutoRequest() is being displayed on it, but it hasn't happened in the eighteen months I've been using it. I don't feel that it's as bad as you make it sound. As to "stress-testing," I suppose I could actually try closing the screen thatthe AutoRequest() is on, but... I don't know. Look, it really does work. Try it, you'll like it! Share and enjoy. -- Bill W. Kelly billk@pnet01.cts.com {nosc ucsd hplabs!hp-sdd}!crash!pnet01!billk crash!pnet01!billk@nosc.mil