Update requests are sent only after the last one has been received an processsed

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12268 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-04-06 20:56:46 +00:00
parent 2f6d87a6c5
commit 81d71c74c8
+9 -9
View File
@@ -551,15 +551,15 @@ void Layer::RequestDraw(const BRegion &reg, Layer *startFrom)
if (updateReg.CountRects() > 0)
{
fOwner->zUpdateReg.Include(&updateReg);
if (!fOwner->fInUpdate)
if (!fOwner->fInUpdate && !fOwner->fRequestSent)
{
// TODO: WHAT if 2 or more update requests are sent before we start to processing the first one.
fOwner->fUpdateReg = fOwner->zUpdateReg;
//fOwner->cnt++;
//if (fOwner->cnt != 1)
// debugger("Adi: Not Allowed!");
fOwner->cnt++;
if (fOwner->cnt != 1)
debugger("Adi: Not Allowed!");
fOwner->zUpdateReg.MakeEmpty();
SendUpdateMsg(fOwner->fUpdateReg);
fOwner->fRequestSent = true;
}
}
}
@@ -630,12 +630,12 @@ void Layer::UpdateStart()
WinBorder *wb = (WinBorder*)this;
wb->fInUpdate = true;
// TODO: wb->fUpdateReg seems to be invalid from time to time. Fix that! [See TODO in RequestDraw]
wb->fRequestSent = false;
wb->yUpdateReg = wb->fUpdateReg;
wb->fUpdateReg.MakeEmpty();
//wb->cnt--;
//if (wb->cnt != 0)
// debugger("Adi2: Not Allowed!");
wb->cnt--;
if (wb->cnt != 0)
debugger("Adi2: Not Allowed!");
}
}