void bug(void) { fDialog = new TGTransientFrame(gClient->GetRoot(), gClient->GetRoot(), 100, 100); fDialog->Move(100, 100); TGTextButton *fTestButton = new TGTextButton(fDialog, "&Click", "Click()", 1); fTestButton->Move(20, 30); TGTextButton *fExitButton = new TGTextButton(fDialog, "&Exit!", "fDialog->UnmapWindow()", 1); fExitButton->Move(20, 60); fDialog->MapSubwindows(); fDialog->MapWindow(); gClient->WaitForUnmap(fDialog); cout << "Never executed if you press on Click Button!" << endl; } void Click(void) { new TGMsgBox(gClient->GetRoot(), gClient->GetRoot(), "Test", "Test", kMBIconStop); return; }