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

arougthopher@lizardland.net, r=sergei_d, a=chofmann
This commit is contained in:
bzbarsky%mit.edu 2003-12-11 18:35:02 +00:00
Родитель 050aac34ee
Коммит 6287838079
2 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);