Re: FVWM: Helper Function to chnages Layers.

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 27 Dec 2002 06:00:57 +0000

On 27 Dec 2002 02:43:23 +0100, Thomas Glanzmann wrote:
>
> > There is a Layer condition to do what you want:
> >
> > ThisWindow (Layer 4) Layer 10
> >
> > Just keep in mind that if you want if-else construct you should use either
> > new 2.5.x Cond command or first conditionally construct a function and
> > only then execute it, like:
> >
> > # cyclicly change a window layer 4 -> 10 -> 5 -> 9 -> 4
> >
> > DestroyFunc ActuallyDoLayer
> > AddToFunc ActuallyDoLayer
> > ThisWindow (Layer 4) + Layer 10
> > ThisWindow (Layer 5) + Layer 9
> > ThisWindow (Layer 9) + Layer 4
> > ThisWindow (Layer 10) + Layer 5
> > ActuallyDoLayer
> >
> > P.S. Layer command does not work in 2.5.5 and in cvs for now.
>
> Thanks for the fast answer. It's the right direction but does not solve my
> specific problem.
>
> I need the following:
>
> If (Layer == 4) {
> put on Layer 10;
> } else {
> put on Layer 4;
> }
>
> I tried the following, but it is crap anyway:
>
> DestroyFunc RaiseOnTop
> AddToFunc RaiseOnTop
> + I Raise
> + ThisWindow (Layer 4) Layer 10
> + ThisWindow (!Layer 4) Layer 4
>
> Because if it done I am back in Layer 4. So I see at the moment no way
> to solve this problem. Do you habe any idea?

I knew you will need an if-else construct, so I solved it for you in
my original message, please reread it again (it is also quoted above).
I will copy it again:

  DestroyFunc RaiseOnTop
  AddToFunc RaiseOnTop
  + I Raise
  + I DestroyFunc ActuallyDoLayer
  + I AddToFunc ActuallyDoLayer
  + I ThisWindow (Layer 4) + Layer 10
  + I ThisWindow (Layer 10) + Layer 4
  + I ActuallyDoLayer

Note, I don't know how this is useful, just does what you ask, in 2.4.x.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Dec 27 2002 - 00:02:20 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST