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:
Stephan Aßmus
2005-07-08 08:48:24 +00:00
parent c0879db147
commit 39e4b4ada6
2 changed files with 15 additions and 20 deletions
+6 -3
View File
@@ -2404,9 +2404,12 @@ Layer::get_user_regions(BRegion &reg)
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;
}
+9 -17
View File
@@ -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(&region);
#endif
/*
#ifndef NEW_CLIPPING