Hi Dank,
Yes it did work, but I removed the line because a permanent grey rectangle was left from where the menu had dropped down and overpainted the GLCanvas. This is because the rendering of the GLCanvas is done directly in video memory so it is impossible to draw a popup menu over a GLCanvas without overwriting the FrameBuffer. So it still calls display() and I still have a problem.
I think the only way for me to do it - it’s terribly clumbsy and might not even work (but if anybody has any better ideas I’m all ears) is to use a boolean variable which I set to true on mousereleased event for menu items. It then copies the whole pixel data of the glcanvas into memory - the display() event sees that the boolean variable is set to true and hence does not do its normal rendering but copies all the pixel data back to the glcanvas in all its original glory.
Regards,
Sal.