DisplayPanel should make the displayed panel active. What is the relationship of the panels? How did you load and display the first panel? DisplayPanel or InstallPopup? Do you force a SetActivePanel after calling DisplayPanel?
The atached sample project has two panels with a button on panel1 to display panel2 and a button on panel2 to hide panel2. They share a callback function below. When DisplayPanel (panel2) is called, it is brought to the front and made the active panel. When HidePanel (panel2) is called, panel1 becomes active again.
case EVENT_COMMIT:
if (panel == PANEL1)
DisplayPanel (panel2);
else
HidePanel (panel2);