Don't flash main window unnecessarily when showing a dialog