remove redundant zoomwindow and switch to user state on resize. 125711 r=pinkerton,scc a=asa
git-svn-id: svn://10.0.0.236/trunk@116680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2ee3be6e37
commit
f396b39b90
@ -1407,10 +1407,10 @@ PRBool nsMacEventHandler::ResizeEvent ( WindowRef inWindow )
|
|||||||
::GetWindowPortBounds ( inWindow, &macRect );
|
::GetWindowPortBounds ( inWindow, &macRect );
|
||||||
::LocalToGlobal(&topLeft(macRect));
|
::LocalToGlobal(&topLeft(macRect));
|
||||||
::LocalToGlobal(&botRight(macRect));
|
::LocalToGlobal(&botRight(macRect));
|
||||||
mTopLevelWidget->SetSizeMode(nsSizeMode_Normal); // size a zoomed window and it's no longer zoomed
|
|
||||||
mTopLevelWidget->Resize(macRect.right - macRect.left + 1, macRect.bottom - macRect.top + 1, PR_FALSE);
|
mTopLevelWidget->Resize(macRect.right - macRect.left + 1, macRect.bottom - macRect.top + 1, PR_FALSE);
|
||||||
if (nsnull != gRollupListener && (nsnull != gRollupWidget) )
|
if (nsnull != gRollupListener && (nsnull != gRollupWidget) )
|
||||||
gRollupListener->Rollup();
|
gRollupListener->Rollup();
|
||||||
|
mTopLevelWidget->UserStateForResize(); // size a zoomed window and it's no longer zoomed
|
||||||
|
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
}
|
}
|
||||||
@ -1599,15 +1599,6 @@ PRBool nsMacEventHandler::HandleMouseDownEvent(EventRecord& aOSEvent)
|
|||||||
{
|
{
|
||||||
gEventDispatchHandler.DispatchSizeModeEvent(mTopLevelWidget,
|
gEventDispatchHandler.DispatchSizeModeEvent(mTopLevelWidget,
|
||||||
partCode == inZoomIn ? nsSizeMode_Normal : nsSizeMode_Maximized);
|
partCode == inZoomIn ? nsSizeMode_Normal : nsSizeMode_Maximized);
|
||||||
|
|
||||||
// Now that we have found the partcode it is ok to actually zoom the window
|
|
||||||
ZoomWindow(whichWindow, partCode, (whichWindow == FrontWindow()));
|
|
||||||
|
|
||||||
Rect macRect;
|
|
||||||
::GetWindowPortBounds(whichWindow, &macRect);
|
|
||||||
::LocalToGlobal(&topLeft(macRect));
|
|
||||||
::LocalToGlobal(&botRight(macRect));
|
|
||||||
mTopLevelWidget->Resize(macRect.right - macRect.left, macRect.bottom - macRect.top, PR_FALSE);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user