Some imprudence for me. All decorators got (re)drawn instead of the one in question. Fixed that.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8055 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2004-06-18 19:13:06 +00:00
parent 5929c56ed0
commit c7ad7fe18e
3 changed files with 29 additions and 22 deletions
+15 -7
View File
@@ -432,8 +432,8 @@ void Layer::RequestDraw(const BRegion &reg, Layer *startFrom)
if (fVisible.CountRects() > 0) if (fVisible.CountRects() > 0)
{ {
fUpdateReg = fVisible; fUpdateReg = fVisible;
if (!(fFlags & B_FULL_UPDATE_ON_RESIZE)) if (fFlags & B_FULL_UPDATE_ON_RESIZE){ }
fUpdateReg.IntersectWith(&reg); else { fUpdateReg.IntersectWith(&reg); }
if (fUpdateReg.CountRects() > 0){ if (fUpdateReg.CountRects() > 0){
fDriver->ConstrainClippingRegion(&fUpdateReg); fDriver->ConstrainClippingRegion(&fUpdateReg);
@@ -451,7 +451,14 @@ void Layer::RequestDraw(const BRegion &reg, Layer *startFrom)
redraw = true; redraw = true;
if (redraw && !(lay->IsHidden())) if (redraw && !(lay->IsHidden()))
lay->RequestDraw(reg, NULL); {
// no need to go deeper if not even the FullVisible region intersects
// Update one.
BRegion common(lay->fFullVisible);
common.IntersectWith(&reg);
if (common.CountRects() > 0)
lay->RequestDraw(reg, NULL);
}
} }
} }
@@ -460,10 +467,11 @@ void Layer::Draw(const BRect &r)
// TODO/NOTE: this should be an empty method! the next lines are for testing only // TODO/NOTE: this should be an empty method! the next lines are for testing only
STRACE(("Layer::Draw() Called\n")); STRACE(("Layer::Draw() Called\n"));
/*
// RGBColor col(152,102,51); RGBColor col(152,102,51);
// DRIVER->FillRect_(r, 1, col, &fUpdateReg); fDriver->FillRect(fUpdateReg.Frame(), col);
//snooze(1000000); snooze(1000000);
*/
fDriver->FillRect(r, fLayerData->viewcolor); fDriver->FillRect(r, fLayerData->viewcolor);
// empty HOOK function. // empty HOOK function.
+13 -14
View File
@@ -731,8 +731,7 @@ Layer * ServerWindow::CreateLayerTree(Layer *localRoot)
delete name; delete name;
// there is no way of setting this, other than manually :-) // there is no way of setting this, other than manually :-)
printf("Layer (%s) hidden : %d?\n", fTitle.String(), hidden); newLayer->fHidden = hidden;
newLayer->fHidden = (hidden == 0)? false: true;
int32 dummyMsg; int32 dummyMsg;
@@ -1667,6 +1666,18 @@ void ServerWindow::DispatchMessage(int32 code)
break; break;
} }
case AS_WINDOW_MOVE:
{
float xMoveBy;
float yMoveBy;
fSession->ReadFloat(&xMoveBy);
fSession->ReadFloat(&yMoveBy);
fWinBorder->MoveBy(xMoveBy, yMoveBy);
break;
}
case B_MINIMIZE: case B_MINIMIZE:
{ {
// TODO: Implement // TODO: Implement
@@ -1685,18 +1696,6 @@ void ServerWindow::DispatchMessage(int32 code)
STRACE(("ServerWindow %s: Message Zoom unimplemented\n",fTitle.String())); STRACE(("ServerWindow %s: Message Zoom unimplemented\n",fTitle.String()));
break; break;
} }
case B_WINDOW_MOVE_TO:
{
// TODO: Implement
STRACE(("ServerWindow %s: Message Move_To unimplemented\n",fTitle.String()));
break;
}
case B_WINDOW_MOVE_BY:
{
// TODO: Implement
STRACE(("ServerWindow %s: Message Move_By unimplemented\n",fTitle.String()));
break;
}
default: default:
{ {
printf("ServerWindow %s received unexpected code - message offset %lx\n",fTitle.String(), code - SERVER_TRUE); printf("ServerWindow %s received unexpected code - message offset %lx\n",fTitle.String(), code - SERVER_TRUE);
+1 -1
View File
@@ -347,7 +347,7 @@ void WinBorder::Draw(const BRect &r)
if(fDecorator) if(fDecorator)
{ {
/* /*
fUpdateReg.PrintToStream(); //fUpdateReg.PrintToStream();
RGBColor c(128, 56, 98); RGBColor c(128, 56, 98);
//fDriver->FillRect(r, c); //fDriver->FillRect(r, c);
fDriver->FillRect(fUpdateReg.Frame(), c); fDriver->FillRect(fUpdateReg.Frame(), c);