unsizable windows are no longer created maximized. bug 230608 r=bryner,jst

This commit is contained in:
danm-moz%comcast.net 2004-02-21 18:02:03 +00:00
Родитель cdb30b9c07
Коммит 1ff0f8f534
1 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -1158,8 +1158,19 @@ PRBool nsXULWindow::LoadMiscPersistentAttributesFromXUL()
sizeMode = nsSizeMode_Minimized;
*/
if (stateString.Equals(SIZEMODE_MAXIMIZED)) {
mIntrinsicallySized = PR_FALSE;
sizeMode = nsSizeMode_Maximized;
/* Honor request to maximize only if the window is sizable.
An unsizable, unmaximizable, yet maximized window confuses
Windows OS and is something of a travesty, anyway. */
PRUint32 chromeFlags = nsIWebBrowserChrome::CHROME_WINDOW_RESIZE;
nsCOMPtr<nsIWebBrowserChrome> chrome(do_GetInterface(
NS_ISUPPORTS_CAST(nsIXULWindow *, this)));
if (chrome)
chrome->GetChromeFlags(&chromeFlags);
if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE) {
mIntrinsicallySized = PR_FALSE;
sizeMode = nsSizeMode_Maximized;
}
}
// the widget had better be able to deal with not becoming visible yet
mWindow->SetSizeMode(sizeMode);