🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12835

Re: A way to Deactivate a Window After it has been Activated??

#12835
From: Jim Mackraz
Date: Tue, 23 May 1989 10:08
30 lines
2017 bytes
In article <8905191406.AA15536@postgres.Berkeley.EDU> dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) writes:
):I've got a program that has multiple windows open at the same time, and I want
):to make sure that the "main" window is always the active window and NOT one of
):the other "informational" windows.. If the user selects one of these other
):windows, is there a way to DeSelect it and return control to the main window??

)	You can always call ActivateWindow() when you get the ACTIVEWINDOW
)IDCMP in one of the informational windows, but doing that sort of munging 
)will interfere with autopoint programs like DMouse which always try to set
)the window under the mouse to the active one.

This is what the Workbench does for its Rename operation.  It is the
true test of AutoPoint stye programs.  I found that the correct
algorithm was for the AutoPoint program never to try to activate a
window which it has most recently tried to activate: try a window
once, and if it doesn't stick, don't try repeatedly.  This works
with Rename, and with anyone else calling ActivateWindow(): the
activation will not be "jerked away" by the AutoPoint tricks.

)	Better to have a shared IDCMP port for all the windows and not 
)bother forcing one to be active over the others.

You should have this, too.

	jimm
-- 
Jim Mackraz, I and I Computing	   	"He's hidden now, but you can see
{cbmvax,well,oliveb}!amiga!jimm          The bubbles where he breathes."
							- Shriekback
Opinions are my own.  Comments are not to be taken as Commodore official policy.
Technical Details
Message-ID: <3857@amiga.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!oliveb!amiga!jimm
References: <8905191406.AA15536@postgres.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!oliveb!amiga!jimm
From: jimm@amiga.UUCP (Jim Mackraz)
Newsgroups: comp.sys.amiga.tech
Subject: Re: A way to Deactivate a Window After it has been Activated??
Message-ID: <3857@amiga.UUCP>
Date: 23 May 89 10:08:37 GMT
References: <8905191406.AA15536@postgres.Berkeley.EDU>
Reply-To: jimm@cloyd.UUCP (Jim Mackraz)
Organization: Commodore-Amiga Inc, Los Gatos CA
Lines: 30