[PATCH]: FvwmButtons: ActiveAction

This is a quick patch to allow FvwmButtons to use an “ActiveAction” command; basically it allows for commands to be run when a mouse is over a button.

I’ll probably look into adding a delay offset, and adding support for SendToModule for it at some point.

You can find the patch here, with necessary details. The manpage and what have you has also been patched. I’d be greatful for testing on this.

edulinux.homeunix.org/fvwm/patches.html [PRIMARY SITE]
starshine.org/xteddy/thomas/fvwm/patches.html [MIRRORED]

– Thomas Adam

I have tried it and it works great.
/Dante65

Hello
Thanks for this great patch but i noticed an ugly “flash” when the ActiveButton is redrawn…
To correct it, simply modify the patch, one line 148

 			redraw = True;

become

[code]- redraw = True;

  •   	if ( UberButton->c->flags.b_ActiveColorset ) {  redraw = True; }[/code]
    

nb: this “effect” doesn’t appear with xcompmgr

Edit: this bug reappear after changing wallpaper… =/
I don’t know what to do, do you have an idea ?

Ta.

– Thomas Adam

I didn’t edit fast enought , sorry ^^
Actually it bugs again when you change wallpaper, or set mplayer as background
So this correction isn’t good enought =(

Produce a minimal config which exhibits this. Also, confirm if it happens with this patch unapplied. I’m doing bits and pieces on FVWM at the moment, so now’s the time to get in quick, whilst I’m in the mood.

– Thomas Adam

I’m sorry, the bug isn’t directy related to this patch.
The bug appear when using a gradient colorset with a Button which geometry divised by it columns/rows isn’t integer

By Exemple:

[code]Colorset 0 DGradient 256 #CECC99 #9BBA91
Colorset 1 bg #FFFFFF

DestroyModuleConfig TaskBar: *
*TaskBar: Geometry 1000x50+0+50
*TaskBar: Columns 1
*TaskBar: Rows 120
*TaskBar: Colorset 1
*TaskBar: (1x15, Colorset 2, ActiveAction Exec mpc toggle)
*TaskBar: (1x90, Colorset 1)
*TaskBar: (1x15, Colorset 2)[/code]

50/120 => not good

Each line of 15 rows bug, but the bug appear most often with the ActiveAction (forst line).
When the patch is unaplied, each line bug as the second one with the patch applied.
(The line without seems to bug if you click into the white zone and next move hover the line)

I’ll try not to user this sort of geometry.
(I’m using it to use % instead of pixel, to work with any screen’s resolution)

Indeed.

This can’t be true, since that has no bearing on how the colorsets are applied.

I’m having real problems understanding you. I suspect why it’s slightly compounded with the ActiveAction patch is due to the {Enter,Leave}Notify requests generated as the mouses from button to button causing a redraw for each button that has an ActiveAction. You’d see the same thing if you used an ActiveIcon as well.

Even just using an unpatched FvwmButtons here, and your simple test case has some flicker, but it’s hardly noticeable.

– Thomas Adam