Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!hoser.berkeley.edu!bryce From: bryce@hoser.berkeley.edu (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: Re: Suggestion for 1.3 (or ...) Message-ID: <21945@ucbvax.BERKELEY.EDU> Date: Wed, 25-Nov-87 05:05:08 EST Article-I.D.: ucbvax.21945 Posted: Wed Nov 25 05:05:08 1987 Date-Received: Sat, 28-Nov-87 18:37:03 EST References: <1106@sugar.UUCP> <21943@ucbvax.BERKELEY.EDU> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: bryce@hoser.berkeley.edu.UUCP (Bryce Nesbitt) Organization: University of California at Berkeley Lines: 39 Keywords: system requesters Summary: sample source code to fix your problem In article <21943@ucbvax.BERKELEY.EDU> carlson@ernie.Berkeley.EDU.UUCP (Richard L. Carlson) writes: > >Here's yet another suggestion for eliminating a minor inconvenience: > >Currently, when a system requester is created, the workbench screen is >implicitly brought to the front so that the requester is guaranteed to >appear... >...Is there a major problem with restoring a screen that I have overlooked? There is already a facilty in the OS to address your complaint, and fix your example of the VT100 screen. All it requires is some dillegence on the part of the programmer: By default the DOS will place requesters relating to your process in the Workbench screen. If your program opens a custom screen it must direct DOS to the new location. This code fragment show how to do that: ------- cut here ------ #include "libraries/dosextens.h" ... struct Process *mproc; struct Window *window; APTR temp; ... mproc=(struct Process *)FindTask(0L); temp=mproc->pr_WindowPtr; /* save old value */ mproc->pr_WindowPtr=(APTR)window; /* set a pointer to any open * window on your screen */ ... mproc->pr_WindowPtr=temp; /* restore value _before_ CloseWindow */ ... CloseWindow(window); |\ /| . Ack! (NAK, SOH, EOT) {o O} . bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce (") U WARNING: hoser's spool directory eats a *lot* of mail. :-(