Re: FVWM: Building a decent Panel?

From: Dominik Vogt <fvwm_at_fvwm.org>
Date: Tue, 15 Apr 2003 10:41:43 +0200

On Mon, Apr 14, 2003 at 07:44:20PM +0000, Mikhael Goikhman wrote:
> On 14 Apr 2003 17:50:11 +0200, Dominik Vogt wrote:
> >
> > AddToFunc enter_handler
> > + I autohide $0 FvwmButtons 500 SW
> > # ^ ^ ^
> > # | | |___ Shade direction (optional)
> > # | |_______ Hide delay
> > # |___________________ Unique window name/resource
> >
> > AddToFunc autohide
> > + I WindowId $0 ($1) Deschedule $0
> > + I WindowId $0 ($1) ThisWindow (shaded) WindowShade off
> > + I CondCase (!Match) All (!shaded, $1) autohide_hide $$$$$$$w $2 $3
> >
> > AddToFunc autohide_hide
> > + I Deschedule $0
> > + I Schedule $1 $0 WindowShade $2
> >
> > AddToFunc StartFunction
> > + I Module FvwmAuto FvwmAutohide -passid -menter enter_handler
>
> This is nice. Just a note, this requires the latest cvs to run.
> I am not quite sure why the number of dollars is 7 instead of 8 here.

Trial and error. I added dollars until it worked. Eight works
fine too.

> Anyway, here is a more short and understandable version of the whole
> thing (all functions have one parameter less and only one dollar):

Ah! I wasn't aware that a window id could be used in conditions.
But you are probably wrong about the number of '$'s because
$[w.id] *is* defined initially, but contains the wrong window.
I'll test that later. There is still a bug with hiding: as long
as enter events keep coming in fast enough, hiding will not
trigger. The Deschedule command in autohide_hide must be
scheduled after the WindowShade command instead of being executed
right away.

> AddToFunc enter_handler
> + I autohide FvwmTaskBar 500 SW
> # ^ ^ ^
> # | | |___ Shade direction (optional)
> # | |_______ Hide delay
> # |___________________ Unique window name/resource
>
> AddToFunc autohide
> + I ThisWindow ($0) Deschedule $[w.id]
> + I ThisWindow ($0, shaded) WindowShade off
> + I Cond (!Match) All ($0, !shaded) autohide_hide $1 $2
>
> AddToFunc autohide_hide
> + I Deschedule $[w.id]
> + I Schedule $0 $[w.id] WindowShade $1
>
> AddToFunc StartFunction
> + I Module FvwmAuto FvwmAutohide -menter enter_handler

Bye

Dominik ^_^ ^_^
--
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 Tue Apr 15 2003 - 03:41:14 BST

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