From dd79576b10cb2e91433329afafe23f2ab5f3ca6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 20 Oct 2005 13:06:38 +0000 Subject: [PATCH] * fixed scrolling for the current clipping code, it brings up a new problem, maybe Adi has an idea for the fix, see comment in the code git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14451 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Layer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/servers/app/Layer.cpp b/src/servers/app/Layer.cpp index e6e2287ae2..f66a241956 100644 --- a/src/servers/app/Layer.cpp +++ b/src/servers/app/Layer.cpp @@ -1854,8 +1854,16 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) { // the region that is going to be copied BRegion copyRegion(src); // apply the current clipping of the layer - copyRegion.IntersectWith(&fVisible); + // don't scroll regions that are pending for + // (or already in) an update + // NOTE: this fixes the visible glitches that resulted from + // scrolling, but it brings up a new problem, which looks + // like the the client receives multiple update messages for + // the same area + // NOTE2: if you don't include both regions, it doesn't work + copyRegion.Exclude(&fOwner->CulmulatedUpdateRegion()); + copyRegion.Exclude(&fOwner->RegionToBeUpdated()); // offset the region to the destination // and apply the current clipping there as well