Hi Greg,
OK, the bad news is that there is a weird behavior with these mouse button events that I will have to investigate, but the good news is that there is also a very simple solution. Simply add:
fEmbCanvas->GetContainer()->AddInput(kButtonPressMask | kButtonReleaseMask);
This should solve all your problems. Otherwise just let me know 
[color=#FF0000]EDITED:[/color]
And BTW, you can avoid using ProcessedEvent() signal/slot by simply using HandleButton:
class CanvasBGFrame : public TGCompositeFrame
{
public:
TContextMenu* fContextMenu;
CanvasBGFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, UInt_t options=0,
Pixel_t back = GetDefaultFrameBackground()) :
TGCompositeFrame(p,w,h,options,back) {
AddInput(kButtonPressMask | kButtonReleaseMask);
fContextMenu = new TContextMenu("CanvasBGFrame");
};
virtual ~CanvasBGFrame(){};
Bool_t HandleButton(Event_t *ev) {
// only popup context menu if user clicked with the right button
if (ev->fType == kButtonRelease && ev->fCode == kButton3) {
Int_t px = 0, py = 0;
Window_t wtarget;
// translate coordinates from the event window (the list box container)
// to the root (desktop) window
gVirtualX->TranslateCoordinates(ev->fWindow,
gClient->GetDefaultRoot()->GetId(),
ev->fX, ev->fY, px, py, wtarget);
// popup the context menu, automatically using the TGListBox methods
// having // *MENU* as comment
fContextMenu->Popup(px, py, this);
}
return TGFrame::HandleButton(ev);
};
virtual void UnZoom() { Emit("UnZoom()"); }; // *MENU* *SIGNAL*
ClassDef(CanvasBGFrame, 0);
};
[color=#FF0000]EDITED(2):[/color]
And BTW, you should cleanup your code to avoid this kind of mix-up:
[code]class MyMainFrame : public TGMainFrame
{
RQ_OBJECT(“MyMainFrame”)
private:
TGMainFrame *fMain;
[/code]
And only (and simply) use:
class MyMainFrame : public TGMainFrame
i.e. remove RQ_OBJECT(“MyMainFrame”) and TGMainFrame *fMain;
Cheers, Bertrand.