[comp.sys.amiga.tech] Window to front/back

carlson@betelgeuse (Richard L. Carlson) (04/07/89)

One feature I would like to have is, if there is only one window on a
screen, that that window's "to front" & "to back" gadgets would act as
*screen* to front/back gadgets, rather than being useless.

I don't expect this to show up in the OS, because it "ruins" the
consistency of the user interface.

However, is there an easy way for me to patch this in?  Specifically,
when you press a window to front/back gadget, does Intuition itself call
the functions WindowToFront()/Back(), or does it just do the actions
"internally"?  In other words, would it do any good to SetFunction()
the WindowToFront()/Back() calls to my own code?  If it's this easy,
someone's probably already done it; but I don't remember seing anything...

I know, I could just try it and see if it worked, but I would like to
be assured of some success before wasting my time trying it.

-- Richard
   {tektronix,dual,sun,decvax,...}!ucbvax!ernie!carlson
   carlson@ernie.berkeley.edu

shs@uts.amdahl.com (Steve Schoettler) (04/08/89)

In article <12073@pasteur.Berkeley.EDU> Richard writes:
>One feature I would like to have is, if there is only one window on a
>screen, that that window's "to front" & "to back" gadgets would act as
>*screen* to front/back gadgets, rather than being useless.

One off the shelf way to do this is to use dmouse, and make sure all windows
start one pixel down from the top of the screen.  Then click both mouse buttons
at the top pixel and you toggle screens!

I think the easiest way to reprogram your gadgets would be to stick a handler
into the input event chain, watching for the window gadget selection, and
calling ScreenToFront(), etc., if appropriate.  If not, pass the event down
the chain for Intuition to do the appropriate thing.
The commodities.library disk from Jim Mackraz has some cookbook routines
to help out with this.

Steve

-- 

        Steve Schoettler
        shs@uts.amdahl.com
        {sun,decwrl,pyramid,ames,uunet}!amdahl!shs
        Amdahl Corp., M/S 213, 1250 E. Arques Ave, Sunnyvale, CA 94088