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:
@@ -432,8 +432,8 @@ void Layer::RequestDraw(const BRegion ®, 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(®);
|
else { fUpdateReg.IntersectWith(®); }
|
||||||
|
|
||||||
if (fUpdateReg.CountRects() > 0){
|
if (fUpdateReg.CountRects() > 0){
|
||||||
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
||||||
@@ -451,7 +451,14 @@ void Layer::RequestDraw(const BRegion ®, 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(®);
|
||||||
|
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.
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user