[Bug 3997] New modal dialogs are behind main window