зеркало из https://github.com/mozilla/pjs.git
Fix bug 161249: when a window is maximized, but partially offscreen, bits of the window were erased and not correctly redrawn, because of a historic EraseRect(), and some short-circuiting in the maximize code, so fix those. r=ben, sr=bryner.
This commit is contained in:
Родитель
cd71d0083f
Коммит
8535949c36
|
@ -767,10 +767,6 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
|
|||
nsWatchTask::GetTask().Suspend();
|
||||
if (::TrackBox(whichWindow, anEvent.where, partCode))
|
||||
{
|
||||
Rect windRect;
|
||||
::GetWindowPortBounds(whichWindow, &windRect);
|
||||
::EraseRect(&windRect);
|
||||
|
||||
if (partCode == inZoomOut)
|
||||
{
|
||||
nsCOMPtr<nsIWidget> topWidget;
|
||||
|
|
|
@ -1232,7 +1232,6 @@ NS_METHOD nsMacWindow::PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
|
|||
NS_METHOD nsMacWindow::SetSizeMode(PRInt32 aMode)
|
||||
{
|
||||
nsresult rv;
|
||||
PRInt32 currentMode;
|
||||
|
||||
if (aMode == nsSizeMode_Minimized) // unlikely on the Mac
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
@ -1241,12 +1240,10 @@ NS_METHOD nsMacWindow::SetSizeMode(PRInt32 aMode)
|
|||
if (mZooming)
|
||||
return NS_OK;
|
||||
|
||||
// already done? it's bad to rezoom a window, so do nothing
|
||||
rv = nsBaseWidget::GetSizeMode(¤tMode);
|
||||
if (currentMode == nsSizeMode_Normal && !mVisible && mZoomOnShow)
|
||||
currentMode = nsSizeMode_Maximized;
|
||||
if (NS_SUCCEEDED(rv) && currentMode == aMode)
|
||||
return NS_OK;
|
||||
// even if our current mode is the same as aMode, keep going
|
||||
// because the window can be maximized and zoomed, but partially
|
||||
// offscreen, and we want a click of the maximize button to move
|
||||
// it back onscreen.
|
||||
|
||||
if (!mVisible) {
|
||||
/* zooming on the Mac doesn't seem to work until the window is visible.
|
||||
|
|
Загрузка…
Ссылка в новой задаче