If your popups have the main window as their parent then they will be displayed above the parent. Isn't that what you're asking for? Is that not what you're seeing?