Bug 263992. Fix widget/windows bug revealed by widget caching changes: Resize(x,y,w,h) needs to fix up popups the same way Move() does. r=ere,sr=roc, patch by swalker and roc
git-svn-id: svn://10.0.0.236/trunk@163667 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8768f6b421
commit
2336c12cf7
@ -2127,6 +2127,22 @@ NS_METHOD nsWindow::Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeig
|
||||
ResizeTranslucentWindow(aWidth, aHeight);
|
||||
#endif
|
||||
|
||||
// When resizing a borderless top-level window the window
|
||||
// must be placed relative to its parent. WIN32 wants to
|
||||
// place it relative to the screen, so we used the cached parent
|
||||
// to calculate the parent's location then add the x,y passed to
|
||||
// the resize to get the screen coordinate for the borderless top-level
|
||||
// window.
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
HWND parent = mBorderlessParent;
|
||||
if (parent) {
|
||||
RECT pr;
|
||||
VERIFY(::GetWindowRect(parent, &pr));
|
||||
aX += pr.left;
|
||||
aY += pr.top;
|
||||
}
|
||||
}
|
||||
|
||||
// Set cached value for lightweight and printing
|
||||
mBounds.x = aX;
|
||||
mBounds.y = aY;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user