[SOLVED]How to popup a root menu on releasing a mouse button

Hi, I’m now using FVWM 2.5.30.
If I put the code

Mouse 1 R A Menu MenuFVWMRoot Mouse 0 0 in configuration file,
then the memu ‘MenuFVWMRoot’ will be poped up under the cursor if I click on the left button in the root window.
What can I do if I want the menu ‘MenuFVWMRoot’ to be poped up only when I release the left button rather than a click. (Nothing happens when the left button is pressed down)

You can’t bind to mouse releases, but what you can do is make use of functions.

Because functions grab the pointer, you will want to use something like this instead:

Mouse 1 R A OpenFvwmRoot

DestroyFunc OpenFvwmRoot
AddToFunc   OpenFvwmRoot C Menu MenuFVWMRoot

– Thomas Adam

Thanks for your help.

Using the code you provided, Fvwm would not interprate a long button press as a hold action and a menu is poped up as I release it.

It is interesting

That is what you wanted, yes?

– Thomas Adam