Make sure to unlock looper on resize. Bug 218697, patch by

arougthopher@lizardland.net, r=sergei_d, a=chofmann


git-svn-id: svn://10.0.0.236/trunk@150216 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2003-12-11 18:35:02 +00:00
parent 6fa844a60f
commit a31435a03b
2 changed files with 3 additions and 8 deletions

View File

@@ -952,7 +952,7 @@ NS_METHOD nsWindow::ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *a
// Move this component
//
//-------------------------------------------------------------------------
nsresult nsWindow::Move(PRInt32 aX, PRInt32 aY, PRBool unlockLooper)
nsresult nsWindow::Move(PRInt32 aX, PRInt32 aY)
{
// Only perform this check for non-popup windows, since the positioning can
// in fact change even when the x/y do not. We always need to perform the
@@ -995,17 +995,13 @@ nsresult nsWindow::Move(PRInt32 aX, PRInt32 aY, PRBool unlockLooper)
else
mView->Window()->MoveTo(aX, aY);
if(mustunlock && unlockLooper)
if(mustunlock)
mView->UnlockLooper();
}
return NS_OK;
}
NS_METHOD nsWindow::Move(PRInt32 aX, PRInt32 aY)
{
return Move(aX,aY,PR_TRUE);
}
//-------------------------------------------------------------------------
//
@@ -1066,7 +1062,7 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
PRInt32 aHeight,
PRBool aRepaint)
{
Move(aX,aY,PR_FALSE);
Move(aX,aY);
// Resize will unlock the looper when the above leaves it locked, so it must go last
Resize(aWidth,aHeight,aRepaint);
return NS_OK;

View File

@@ -129,7 +129,6 @@ public:
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
PRInt32 *aX, PRInt32 *aY);
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
virtual nsresult Move(PRInt32 aX, PRInt32 aY, PRBool unlockLooper);
NS_IMETHOD Resize(PRInt32 aWidth,
PRInt32 aHeight,
PRBool aRepaint);