diff --git a/mozilla/xpfe/bootstrap/nsNativeAppSupportOS2.cpp b/mozilla/xpfe/bootstrap/nsNativeAppSupportOS2.cpp index 2f7222e2ce8..f9357dfcf5f 100644 --- a/mozilla/xpfe/bootstrap/nsNativeAppSupportOS2.cpp +++ b/mozilla/xpfe/bootstrap/nsNativeAppSupportOS2.cpp @@ -2296,6 +2296,16 @@ nsNativeAppSupportOS2::StartServerMode() { // We dont have to anything anymore. The native UI // will create the window return NS_OK; + } else { + // Sometimes a window will have been opened even though mShouldShowUI is false + // (e.g., mozilla -mail -turbo). Detect that by testing whether there's a + // window already open. + nsCOMPtr win; + GetMostRecentWindow( 0, getter_AddRefs( win ) ); + if ( win ) { + // Window already opened, don't need this special Nav window. + return NS_OK; + } } // Since native UI wont create any window, we create a hidden window