Problems faking right-click.

I’m attempting to “bump” my swallowed FvwmScript clock when I right-click, as described here:
forums.gentoo.org/viewtopic-p-21 … ml#2140318

The right-click always gets passed through as a SingeClic. I can’t work out what I’m doing wrong.

*ButtTaskbar:	(95x1, Right, Swallow "FvwmScript-Clock" "FvwmScript FvwmScript-Clock", Action(Mouse 3) 'SendToModule FvwmScript-Clock SendString 1 1 bump')

[code]WindowTitle {FvwmScript-Clock}
WindowSize 95 20

Init
Begin
Set $time = (GetOutput {exec date +%e/%H%M""} 1 -1)
ChangeTitle 1 $time
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 60)==0 Then
Begin
Set $time = (GetOutput {exec date +%e/%H%M""} 1 -1)
ChangeTitle 1 $time
End
End

Widget 1
Property
Size 95 20
Position 0 0
Colorset 28

Font “xft:Liberation:pixelsize=20:bold”

Font "Shadow=1 0 C:xft:Liberation:pixelsize=22:bold"
Type ItemDraw
Flags NoReliefString
Main
    Case message of
    SingleClic :
        Begin
            Do {Menu MenuSystem}
        End
    1 :
        Begin
            Do {Menu MenuRoot}
        End
End

[/code]

Reading the source helps.

I’ve fixed this in CVS.

– Thomas Adam

I’m still not able to make this work. I’ve looked through the code for FvwmButtons but can’t find the relevant code. But I’m mostly skimming through the comments cos I don’t know C.

You’re looking in the wrong place.

Send me again scripts/config I need to be able to reproduce this, and I’ll take another look.

– Thomas Adam

Hopefully this is what you need. The SendToModule command entered into FvwmConsole works fine.

[code]DestroyModuleConfig FvwmButtons: ButtTaskbar
Piperead ‘echo *ButtTaskbar: Geometry $[vp.width]x22+0-0’
*ButtTaskbar: Font None
*ButtTaskbar: Colorset 28
*ButtTaskbar: Rows 1
Piperead ‘echo *ButtTaskbar: Columns $$(($[vp.width]))’
*ButtTaskbar: Padding 0 0
*ButtTaskbar: Frame 0
*ButtTaskbar: (19x1, Icon opera.png, PressIcon operaP.png, Padding 0 0, Action (Mouse 1) FuncButtOpera, Action (Mouse 3) Menu OperaWindowOps Rectangle +$left+$top 0 -100m)
*ButtTaskbar: (1225x1, Left, Swallow “IconTaskbar” “FvwmIconMan IconTaskbar -g -30000-30000”)
*ButtTaskbar: (10x1)
*ButtTaskbar: (20x1, Center, Icon drive-removable-media-3.svg:16x16, Action (Mouse 1) “Menu FvwmMenuUdisks Rectangle +$left+$top 0 -100m”)
*ButtTaskbar: (20x1, Center, Icon mail-new.png)
*ButtTaskbar: (20x1, Center, Action (Mouse 4) ‘SendToModule volume SendString 1 1 bump’, Action (Mouse 5) ‘SendToModule volume SendString 1 2 bump’, Swallow “volume” “FvwmScript volume”)
*ButtTaskbar: (18x1, Center, Icon bluetooth_on.png, Action (Mouse 1) “Menu FvwmMenuBluetooth Rectangle +$left+$top 0 -100m”)
#*ButtTaskbar: (20x1, Center, Icon facebook.png, Action (Mouse 1) “Menu FBMenu Rectangle +$left+$top 0 -100m”)
*ButtTaskbar: (20x1, Center, Padding 0 3, Swallow “WifiStrength” “Module FvwmScript wifistrength”)
*ButtTaskbar: (100x1, Right, Swallow “FvwmScript-Clock” “FvwmScript FvwmScript-Clock”, Action(Mouse 3) ‘SendToModule FvwmScript-Clock SendString 1 1 bump’)
*ButtTaskbar: (8x1, Action (Mouse 3) Menu MenuRoot, Action (Mouse 1) FuncShowDesktop)

Style ButtTaskbar !Title,
!Handles,
!Borders,
!Maximizable,
!Iconifiable,
NeverFocus,
WindowListSkip,
Sticky,
BorderWidth 0,
HandleWidth 0[/code]

[code]WindowTitle {FvwmScript-Clock}
WindowSize 100 25

Init
Begin
Set $time = (GetOutput {exec date +%e/%H%M""} 1 -1)
ChangeTitle 1 $time
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 60)==0 Then
Begin
Set $time = (GetOutput {exec date +%e/%H%M""} 1 -1)
ChangeTitle 1 $time
End
End

Widget 1
Property
Size 100 25
Position 0 0
Colorset 28

Font “xft:Liberation:pixelsize=20:bold”

Font "Shadow=1 0 C:xft:Liberation:pixelsize=22:bold"
Type ItemDraw
Flags NoReliefString
Main
    Case message of
    SingleClic :
        Begin
            Do {Menu MenuSystem}
        End
    1 :
        Begin
            Do {Menu MenuRoot}
        End
End[/code]

I’m still incapable of get this to work. I’ve looked with the code for FvwmButtons but aren’t able to find the kind of code. But I’m mostly skimming over the comments cos I’m not sure C.