Re: FVWM: Abort from function?

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Wed, 24 Jul 2002 21:30:54 +0000

On 24 Jul 2002 17:16:14 -0400, Victor Eijkhout wrote:
>
> 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.

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
>
> AddToFunc ShadeAndRaise
> + I WindowShade
> + I Raise
> + I Abort

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.
--
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 Wed Jul 24 2002 - 16:31:51 BST

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