b=665540 position new popup windows even when there is no Move() or Resize(x,y,w,h) r=roc

--HG--
extra : rebase_source : 66fb0f413fac340cbd570c890d83cdd0cf2797ca
This commit is contained in:
Karl Tomlinson 2011-07-08 15:13:52 +12:00
Родитель 8ca97d0f6d
Коммит 00bd743a4b
1 изменённых файлов: 13 добавлений и 10 удалений

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

@ -3868,16 +3868,6 @@ nsWindow::Create(nsIWidget *aParent,
// save our bounds
mBounds = aRect;
if (mWindowType != eWindowType_child &&
mWindowType != eWindowType_plugin) {
// We only move a toplevel window if someone has actually placed the
// window somewhere. If no placement has taken place, we just let the
// window manager Do The Right Thing.
//
// Indicate that if we're shown, we at least need to have our size set.
// If we get explicitly moved, the position will also be set.
mNeedsResize = PR_TRUE;
}
// figure out our parent window
GtkWidget *parentMozContainer = nsnull;
@ -3913,6 +3903,14 @@ nsWindow::Create(nsIWidget *aParent,
case eWindowType_invisible: {
mIsTopLevel = PR_TRUE;
// We only move a general managed toplevel window if someone has
// actually placed the window somewhere. If no placement has taken
// place, we just let the window manager Do The Right Thing.
//
// Indicate that if we're shown, we at least need to have our size set.
// If we get explicitly moved, the position will also be set.
mNeedsResize = PR_TRUE;
nsXPIDLString brandName;
GetBrandName(brandName);
NS_ConvertUTF16toUTF8 cBrand(brandName);
@ -3949,6 +3947,11 @@ nsWindow::Create(nsIWidget *aParent,
}
}
else if (mWindowType == eWindowType_popup) {
// With popup windows, we want to control their position, so don't
// wait for the window manager to place them (which wouldn't
// happen with override-redirect windows anyway).
mNeedsMove = PR_TRUE;
// Popups that are not noautohide are only temporary. The are used
// for menus and the like and disappear when another window is used.
if (!aInitData->mNoAutoHide) {