зеркало из https://github.com/mozilla/gecko-dev.git
Don't use screenbits.bounds for determining constraints on moving or growing windows. Use bounding rect of GetGrayRgn().
This commit is contained in:
Родитель
e960e8007a
Коммит
6b9ba62564
|
@ -245,9 +245,7 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
|
|||
::SetPort(whichWindow);
|
||||
if (!(anEvent.modifiers & cmdKey))
|
||||
::SelectWindow(whichWindow);
|
||||
Rect screenRect = qd.screenBits.bounds;
|
||||
::InsetRect(&screenRect, 4, 4);
|
||||
screenRect.top += ::LMGetMBarHeight();
|
||||
Rect screenRect = (**::GetGrayRgn()).rgnBBox;
|
||||
::DragWindow(whichWindow, anEvent.where, &screenRect);
|
||||
|
||||
::GetMouse(&anEvent.where);
|
||||
|
@ -283,9 +281,7 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
|
|||
}
|
||||
}
|
||||
#else
|
||||
Rect sizeRect;
|
||||
sizeRect.bottom = qd.screenBits.bounds.bottom;
|
||||
sizeRect.right = qd.screenBits.bounds.right;
|
||||
Rect sizeRect = (**::GetGrayRgn()).rgnBBox;
|
||||
sizeRect.top = sizeRect.left = 75;
|
||||
long newSize = ::GrowWindow(whichWindow, anEvent.where, &sizeRect);
|
||||
if (newSize != 0)
|
||||
|
|
|
@ -182,11 +182,7 @@ NS_IMETHODIMP nsMacWindow::Show(PRBool bState)
|
|||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsMacWindow::Move(PRUint32 aX, PRUint32 aY)
|
||||
{
|
||||
//¥TODO: We should check that the new window belongs to one of the screens
|
||||
// but "qd.screenBits.bounds" is not the right way to do it.
|
||||
Rect screenRect = qd.screenBits.bounds;
|
||||
::InsetRect(&screenRect, 4, 4);
|
||||
screenRect.top += ::LMGetMBarHeight() + kWindowTitleBarHeight;
|
||||
Rect screenRect = (**::GetGrayRgn()).rgnBBox;
|
||||
|
||||
short windowWidth = mWindowPtr->portRect.right - mWindowPtr->portRect.left;
|
||||
if (((PRInt32)aX) < screenRect.left - windowWidth)
|
||||
|
|
Загрузка…
Ссылка в новой задаче