зеркало из https://github.com/mozilla/pjs.git
implement GetScreenBounds, which wasn't, oddly. this should fix placement of top-level windows which, equally oddly, seemed unbroken except in one very esoteric circumstance. bug 233081 r=ere,roc
This commit is contained in:
Родитель
3932d23ede
Коммит
a5ef79e0d6
|
@ -2282,7 +2282,23 @@ void nsWindow::GetNonClientBounds(nsRect &aRect)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// like GetBounds, but don't offset by the parent
|
||||
NS_METHOD nsWindow::GetScreenBounds(nsRect &aRect)
|
||||
{
|
||||
if (mWnd) {
|
||||
RECT r;
|
||||
VERIFY(::GetWindowRect(mWnd, &r));
|
||||
|
||||
aRect.width = r.right - r.left;
|
||||
aRect.height = r.bottom - r.top;
|
||||
aRect.x = r.left;
|
||||
aRect.y = r.top;
|
||||
} else
|
||||
aRect = mBounds;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Set the background color
|
||||
|
|
|
@ -336,6 +336,7 @@ public:
|
|||
NS_IMETHOD SetFocus(PRBool aRaise);
|
||||
NS_IMETHOD GetBounds(nsRect &aRect);
|
||||
NS_IMETHOD GetClientBounds(nsRect &aRect);
|
||||
NS_IMETHOD GetScreenBounds(nsRect &aRect);
|
||||
NS_IMETHOD SetBackgroundColor(const nscolor &aColor);
|
||||
virtual nsIFontMetrics* GetFont(void);
|
||||
NS_IMETHOD SetFont(const nsFont &aFont);
|
||||
|
|
Загрузка…
Ссылка в новой задаче