Fix bug 297541. Patch by roc, r=pavlov, sr=bzbarsky

This commit is contained in:
bzbarsky%mit.edu 2006-01-20 21:31:29 +00:00
Родитель f34baea140
Коммит 8689f7d81f
1 изменённых файлов: 14 добавлений и 1 удалений

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

@ -551,6 +551,8 @@ nsWindow::Move(PRInt32 aX, PRInt32 aY)
mWindowType != eWindowType_popup)
return NS_OK;
// XXX Should we do some AreBoundsSane check here?
mBounds.x = aX;
mBounds.y = aY;
@ -570,10 +572,14 @@ nsWindow::Move(PRInt32 aX, PRInt32 aY)
// actually placed the window somewhere. If no placement
// has taken place, we just let the window manager Do The
// Right Thing.
if (mPlaced)
// XXX Uhhh ... aX and aY are in twips, not screen coordinates
// XXX mPlaced is always PR_TRUE here, see above
if (mPlaced) {
NS_WARNING("BOGUS code reached!");
gtk_window_move(GTK_WINDOW(mShell), aX, aY);
}
}
}
else if (mDrawingarea) {
moz_drawingarea_move(mDrawingarea, aX, aY);
}
@ -2275,6 +2281,13 @@ nsWindow::NativeCreate(nsIWidget *aParent,
// save our bounds
mBounds = aRect;
if (mWindowType != eWindowType_child) {
// The window manager might place us. Indicate that if we're
// shown, we want to go through
// nsWindow::NativeResize(x,y,w,h) to maybe set our own
// position.
mNeedsMove = PR_TRUE;
}
// figure out our parent window
MozDrawingarea *parentArea = nsnull;