While I was playing around with some ideas for FvwmScript, I noticed an
odd behavior that I was unable to explain by reading the man pages. I
suspect its a bug tickled by improper usage, but I'll leave that up to
you folks to decide. I've written and attached a small test script that
shows the problem.
Basically by my understanding, the attached script should advance the
red background one button every 5 seconds. However what actually happens
is that for one second out of 5 the red background cycles as fast as my
machine can make it go.
If I add a "Title" line to each widget, the script works predictably and
only advances once every 5 seconds. Seems like the interpreter doesn't
like empty buttons too well.
I have tested this with the most current build:
fvwm 2.5.13 (snap-20050204) compiled on Feb 4 2005 at 13:33:45
with support for: ReadLine, XPM, PNG, Shape, XShm, SM, Xinerama,
XRender, XFT, NLS
Regards,
Fred.
P.S.: There is a typo in the man page for FvwmScript where
"PeriodicTasks" is spelled "Periodic Task" in the example.
--- Begin script ---
WindowTitle {ScriptSilon}
WindowSize 150 50
WindowPosition 300 300
Font "Shadow=1:xft:Verdana:style=Regular:pixelsize=12:minspace=true"
BackColor {rgb:77/77/77}
Init
Begin
Set $NewLight=1
End
PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 5)==0 Then
Begin
Set $OldLight=$NewLight
Set $NewLight=(Add $NewLight 1)
If $NewLight==4 Then
Set $NewLight=1
ChangeTitle 4 $NewLight
ChangeBackColor $OldLight {white}
ChangeBackColor $NewLight {red}
End
End
Widget 1
Property
Size 10 18
Position 0 0
Type PushButton
BackColor {White}
Main
Case message of
SingleClic :
Begin
ChangeBackColor 1 {rgb:00/00/ff}
End
End
Widget 2
Property
Size 10 18
Position 30 0
Type PushButton
BackColor {white}
Main
Case message of
SingleClic :
Begin
ChangeBackColor 2 {rgb:00/00/ff}
End
End
Widget 3
Property
Size 10 18
Position 60 0
Type PushButton
BackColor {white}
Main
Case message of
SingleClic :
Begin
ChangeBackColor 3 {rgb:00/00/ff}
End
End
Widget 4
Property
Size 10 18
Position 90 0
Type PushButton
Title {1}
BackColor {white}
Main
End
--
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 Feb 04 2005 - 16:40:05 GMT