This fixes up those update request being lost.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12172 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2005-03-30 22:13:26 +00:00
parent fbdc6c450d
commit 4c6f8b572e
3 changed files with 22 additions and 4 deletions

View File

@ -557,8 +557,14 @@ void Layer::RequestDraw(const BRegion &reg, Layer *startFrom)
if (fUpdateReg.CountRects() > 0) if (fUpdateReg.CountRects() > 0)
{ {
if (!fOwner->fInUpdate)
{
fOwner->prevInvalid = fUpdateReg;
SendUpdateMsg(); SendUpdateMsg();
} }
else
fOwner->zUpdateReg.Include(&fUpdateReg);
}
// we're not that different than other. We too have an // we're not that different than other. We too have an
// update region to which our drawing is restrincted. // update region to which our drawing is restrincted.
@ -657,9 +663,9 @@ void Layer::UpdateStart()
fInUpdate = true; fInUpdate = true;
if (fClassID == AS_WINBORDER_CLASS) if (fClassID == AS_WINBORDER_CLASS)
{ {
// NOTE: don't worry, RooLayer is locked here.
WinBorder *wb = (WinBorder*)this; WinBorder *wb = (WinBorder*)this;
wb->yUpdateReg = wb->zUpdateReg; wb->yUpdateReg = wb->prevInvalid;
wb->zUpdateReg.MakeEmpty();
} }
fClipReg = &fUpdateReg; fClipReg = &fUpdateReg;
} }
@ -672,6 +678,15 @@ void Layer::UpdateEnd()
{ {
WinBorder *wb = (WinBorder*)this; WinBorder *wb = (WinBorder*)this;
wb->yUpdateReg.MakeEmpty(); wb->yUpdateReg.MakeEmpty();
wb->zUpdateReg.Exclude(&wb->prevInvalid);
if (wb->zUpdateReg.CountRects() > 0)
{
wb->prevInvalid = wb->zUpdateReg;
fUpdateReg = wb->zUpdateReg;
SendUpdateMsg();
}
else
wb->prevInvalid.MakeEmpty();
} }
fInUpdate = false; fInUpdate = false;

View File

@ -1416,7 +1416,9 @@ void ServerWindow::DispatchMessage(int32 code, LinkMsgReader &link)
case AS_END_UPDATE: case AS_END_UPDATE:
{ {
DTRACE(("ServerWindowo %s: AS_END_UPDATE\n",fTitle.String())); DTRACE(("ServerWindowo %s: AS_END_UPDATE\n",fTitle.String()));
fWinBorder->GetRootLayer()->Lock();
cl->UpdateEnd(); cl->UpdateEnd();
fWinBorder->GetRootLayer()->Unlock();
break; break;
} }
@ -1649,7 +1651,7 @@ void ServerWindow::DispatchGraphicsMessage(int32 code, LinkMsgReader &link)
{ {
fWinBorder->GetRootLayer()->Lock(); fWinBorder->GetRootLayer()->Lock();
BRegion rreg(cl->fVisible); BRegion rreg(cl->fVisible);
rreg.Include(&fWinBorder->zUpdateReg); rreg.Include(&fWinBorder->yUpdateReg);
desktop->GetDisplayDriver()->ConstrainClippingRegion(&rreg); desktop->GetDisplayDriver()->ConstrainClippingRegion(&rreg);

View File

@ -114,6 +114,7 @@ protected:
BRegion zUpdateReg; BRegion zUpdateReg;
BRegion yUpdateReg; BRegion yUpdateReg;
BRegion prevInvalid;
int32 fMouseButtons; int32 fMouseButtons;
int32 fKeyModifiers; int32 fKeyModifiers;