[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows that disappear/rea



>      [Headers deleted...]

>      Is there a bit somewhere that can be set so that a(ll) window(s) will
>      disappear when MACL 1.3.2 is swapped out and reappear when the
>      application becomes active again?
> 
>   No, there isn't.  Certain future operating systems do, though, support
>   this functionality as a user option.
> 
>   If you want it to happen under program control (rather than under user
>   control), you could try just moving the windows off screen.
> 
>The only problem here is that there is no hook in MCL that lets the user
>know when MCL switches between foreground and background.  Maybe we should
>have something like *FOREGROUND-CHANGED-HOOK* which is a list of functions
>to call after the value of *FOREGROUND* changes.  (note: you can write
>an *eventhook* that will notice when this happens).

It is possible to put a comparison in a view-deactivate-event-handler
between *foreground-event-ticks* and (event-ticks).  *Usually*, if you call
usual-view-deactivate-event-handler before doing this test the correct
answer is given.  Sometimes, though, the variable and/or function aren't
reset immediately.  I don't claim to know exactly why this is.
I would actually recommend a list of functions to be executed on swap out
and a second list on swap in if you go the *foreground-changed-hook* route.
 Otherwise each function will have to check which way the swap is going to
decide what to do.
It would be even better (at least in the times I've needed it) if some
special mixin object had object functions swap-in-event-handler and
swap-out-event-handler.  Then any object that had to respond to such events
could do so.  [Offhand, I can't think of any except windows, but you never
know.]

"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu