quick fix to have Tracker display icons, hope this still reaches you, Axel
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13555 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2404,9 +2404,12 @@ Layer::get_user_regions(BRegion ®)
|
||||
while (stackData) {
|
||||
if (stackData->ClippingRegion()) {
|
||||
// transform in screen coords
|
||||
BRegion screenReg(*stackData->ClippingRegion());
|
||||
ConvertToScreen2(&screenReg);
|
||||
reg.IntersectWith(&screenReg);
|
||||
// NOTE: Already is in screen coords, but I leave this here in
|
||||
// case we change it
|
||||
// BRegion screenReg(*stackData->ClippingRegion());
|
||||
// ConvertToScreen2(&screenReg);
|
||||
// reg.IntersectWith(&screenReg);
|
||||
reg.IntersectWith(stackData->ClippingRegion());
|
||||
}
|
||||
stackData = stackData->prevState;
|
||||
}
|
||||
|
||||
@@ -1088,26 +1088,13 @@ myRootLayer->Unlock();
|
||||
fLink.Flush();
|
||||
} else {
|
||||
// TODO: Watch out for the coordinate system in AS_LAYER_GET_CLIP_REGION
|
||||
BRegion region;
|
||||
|
||||
// TODO: This could also be done more reliably in the Layer,
|
||||
// when the State stack is implemented there. There should be
|
||||
// DrawData::fCulmulatedClippingRegion...
|
||||
// TODO: the DrawData clipping region should be in local view coords.
|
||||
LayerData* layerData = fCurrentLayer->fLayerData;
|
||||
|
||||
do {
|
||||
if (layerData->ClippingRegion())
|
||||
region.IntersectWith(layerData->ClippingRegion());
|
||||
} while ((layerData = layerData->prevState) != NULL);
|
||||
|
||||
int32 rectCount = region.CountRects();
|
||||
int32 rectCount = fCurrentLayer->fVisible.CountRects();
|
||||
|
||||
fLink.StartMessage(SERVER_TRUE);
|
||||
fLink.Attach<int32>(rectCount);
|
||||
|
||||
for (int32 i = 0; i < rectCount; i++)
|
||||
fLink.Attach<BRect>(fCurrentLayer->ConvertFromTop(region.RectAt(i)));
|
||||
fLink.Attach<BRect>(fCurrentLayer->ConvertFromTop(fCurrentLayer->fVisible.RectAt(i)));
|
||||
|
||||
fLink.Flush();
|
||||
}
|
||||
@@ -1129,9 +1116,14 @@ myRootLayer->Unlock();
|
||||
link.Read<BRect>(&r);
|
||||
region.Include(fCurrentLayer->ConvertToTop(r));
|
||||
}
|
||||
fCurrentLayer->fLayerData->SetClippingRegion(region);
|
||||
// TODO: Turned off user clipping for now (will probably not harm anything but performance right now)
|
||||
// We need to integrate user clipping more, in Layer::PopState, the clipping needs to be
|
||||
// restored too. "AS_LAYER_SET_CLIP_REGION" is irritating, as I think it should be
|
||||
// "AS_LAYER_CONSTRAIN_CLIP_REGION", since it means to "add" to the current clipping, not "set" it.
|
||||
// fCurrentLayer->fLayerData->SetClippingRegion(region);
|
||||
#ifndef NEW_CLIPPING
|
||||
fCurrentLayer->RebuildFullRegion();
|
||||
// TODO: set the clipping
|
||||
// fCurrentLayer->fVisible.IntersectWith(®ion);
|
||||
#endif
|
||||
/*
|
||||
#ifndef NEW_CLIPPING
|
||||
|
||||
Reference in New Issue
Block a user