mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Don't use screenbits.bounds for determining constraints on moving or growing windows. Use bounding rect of GetGrayRgn().
This commit is contained in:
parent
e960e8007a
commit
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)
|
||||
|
Loading…
Reference in New Issue
Block a user