diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp index f1730c059afa..7a38ad03d05e 100644 --- a/xpfe/appshell/AppWindow.cpp +++ b/xpfe/appshell/AppWindow.cpp @@ -1151,14 +1151,17 @@ static Maybe ReadIntAttribute(const Element& aElement, // to fit to the screen when staggering windows; if they're negative, // we use the window's current size instead. bool AppWindow::LoadPositionFromXUL(int32_t aSpecWidth, int32_t aSpecHeight) { - bool gotPosition = false; - // if we're the hidden window, don't try to validate our size/position. We're // special. if (mIsHiddenWindow) { return false; } + // If we're not in the normal sizemode, don't move the window around. + if (mWindow->SizeMode() != nsSizeMode_Normal) { + return false; + } + RefPtr root = GetWindowDOMElement(); NS_ENSURE_TRUE(root, false); @@ -1184,6 +1187,7 @@ bool AppWindow::LoadPositionFromXUL(int32_t aSpecWidth, int32_t aSpecHeight) { // Obtain the position information from the element. DesktopIntPoint specPoint = curPoint; + bool gotPosition = false; // Also read lowercase screenx/y because the front-end sometimes sets these // via setAttribute on HTML documents like about:blank, and stuff gets @@ -1219,7 +1223,6 @@ bool AppWindow::LoadPositionFromXUL(int32_t aSpecWidth, int32_t aSpecHeight) { if (specPoint != curPoint) { SetPositionDesktopPix(specPoint.x, specPoint.y); } - return gotPosition; }