Subject: FVWM: Abort from function?

From: Victor Eijkhout <[email-masked]>
Date: Wed, 24 Jul 2002 17:16:14 -0400

I want a function that will "windowshade rollup and lower window" or 
"windowshade unroll and raise window". The following:

Mouse 0 T N MoveOrRaiseOrShade
AddToFunc MoveOrRaiseOrShade
+ C Raise
+ M Move
+ D Current (Shaded) ShadeAndRaise
+ D Current (!Shaded) ShadeAndAway

has a cute bug: if a window is shaded, both last lines are executed.

So I was wondering, is there an Abort function so that I can write

AddToFunc ShadeAndRaise
+ I WindowShade
+ I Raise
+ I Abort

Other solutions welcome too.

-- 
Victor Eijkhout <[email-masked]>
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 24 Jul 2002 21:30:54 +0000

> has a cute bug: if a window is shaded, both last lines are executed.

You want an if-else syntax instead.

In 2.5.1+ do this:

  + D ThisWindow (Shaded) ShadeAndRaise
  + D Cond (NoMatch) ShadeAndAway

> So I was wondering, is there an Abort function so that I can write

There is a new command Break that finishes the function, but only the
current one, not the parent. You don't really need Abort for this task.

The way it works, you may even do this using 1 function, not 3:

  AddToFunc MoveOrRaiseOrShade
  + C Raise
  + M Move
  + D ThisWindow (Shaded) Raise
  + D WindowShade
  + D Cond (NoMatch) Lower

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 25 Jul 2002 10:36:06 +0200

>   + D Cond (NoMatch) ShadeAndAway

Just let me add that the syntax of conditional commands will
probably change before 2.6 is released.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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 [email-masked].
To report problems, send mail to [email-masked].