I wanted to use fbpanel with the taskbar plugin but did not want the end users to be able to right click on taskbar buttons.
I have never used c before but found the source code easy enough to follow and to add the functionality I needed. Not sure if I have done it 'right'. I have added a check for the keyword 'rightclick' in the plugin config, if present and set to false then the menu creation function is not called to generate a menu and the button event callback is not run. if the keyword is not present or not set to false behavior is as before.
Hope it is useful to someone other than me!