Cleanup after the old clipping code. Removed a few methods as others took their place. More cleanup to follow on tomorrow. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14764 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+60
-122
@@ -441,23 +441,6 @@ Layer::SetFlags(uint32 flags)
|
|||||||
fDrawState->SetSubPixelPrecise(fFlags & B_SUBPIXEL_PRECISE);
|
fDrawState->SetSubPixelPrecise(fFlags & B_SUBPIXEL_PRECISE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redraw
|
|
||||||
void
|
|
||||||
Layer::Redraw(const BRegion& reg, Layer *startFrom)
|
|
||||||
{
|
|
||||||
STRACE(("Layer(%s)::Redraw();\n", Name()));
|
|
||||||
if (IsHidden())
|
|
||||||
// this layer has nothing visible on screen, so bail out.
|
|
||||||
return;
|
|
||||||
|
|
||||||
BRegion *pReg = const_cast<BRegion*>(®);
|
|
||||||
|
|
||||||
if (pReg->CountRects() > 0)
|
|
||||||
RequestDraw(reg, startFrom);
|
|
||||||
|
|
||||||
STRACE(("Layer(%s)::Redraw() ENDED\n", Name()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
void
|
void
|
||||||
Layer::Draw(const BRect &rect)
|
Layer::Draw(const BRect &rect)
|
||||||
@@ -945,70 +928,6 @@ Layer::PrintTree()
|
|||||||
printf("\t%s\t%s\n", lay->Name(), lay->IsHidden()? "Hidden": "NOT hidden");
|
printf("\t%s\t%s\n", lay->Name(), lay->IsHidden()? "Hidden": "NOT hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
// RequestDraw
|
|
||||||
void
|
|
||||||
Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|
||||||
{
|
|
||||||
STRACE(("Layer(%s)::RequestDraw()\n", Name()));
|
|
||||||
|
|
||||||
// do not redraw any child until you must
|
|
||||||
int redraw = false;
|
|
||||||
if (!startFrom)
|
|
||||||
redraw = true;
|
|
||||||
|
|
||||||
if (HasClient() && IsTopLayer()) {
|
|
||||||
// calculate the minimum region/rectangle to be updated with
|
|
||||||
// a single message to the client.
|
|
||||||
BRegion updateReg(fFullVisible2);
|
|
||||||
|
|
||||||
updateReg.IntersectWith(®);
|
|
||||||
|
|
||||||
if (updateReg.CountRects() > 0) {
|
|
||||||
fOwner->fCumulativeRegion.Include(&updateReg);
|
|
||||||
if (fOwner->fUpdateRequestsEnabled && !fOwner->InUpdate() && !fOwner->fRequestSent) {
|
|
||||||
fOwner->fInUpdateRegion = fOwner->fCumulativeRegion;
|
|
||||||
fOwner->cnt++;
|
|
||||||
if (fOwner->cnt != 1)
|
|
||||||
CRITICAL("Layer::RequestDraw(): fOwner->cnt != 1 -> Not Allowed!");
|
|
||||||
fOwner->fRequestSent = true; // this is here to avoid a possible de-synchronization
|
|
||||||
if (SendUpdateMsg(fOwner->fInUpdateRegion) == B_OK) {
|
|
||||||
fOwner->fCumulativeRegion.MakeEmpty();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fOwner->fRequestSent = false;
|
|
||||||
fOwner->fInUpdateRegion.MakeEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fVisible2.CountRects() > 0) {
|
|
||||||
BRegion updateReg(fVisible2);
|
|
||||||
updateReg.IntersectWith(®);
|
|
||||||
|
|
||||||
if (updateReg.CountRects() > 0) {
|
|
||||||
fDriver->ConstrainClippingRegion(&updateReg);
|
|
||||||
Draw(updateReg.Frame());
|
|
||||||
fDriver->ConstrainClippingRegion(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Layer *lay = LastChild(); lay != NULL; lay = PreviousChild()) {
|
|
||||||
if (lay == startFrom)
|
|
||||||
redraw = true;
|
|
||||||
|
|
||||||
if (redraw && !(lay->IsHidden())) {
|
|
||||||
// no need to go deeper if not even the FullVisible region intersects
|
|
||||||
// Update one.
|
|
||||||
BRegion common(lay->fFullVisible2);
|
|
||||||
common.IntersectWith(®);
|
|
||||||
|
|
||||||
if (common.CountRects() > 0)
|
|
||||||
lay->RequestDraw(reg, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Returns the layer's ServerWindow
|
\brief Returns the layer's ServerWindow
|
||||||
|
|
||||||
@@ -1034,7 +953,6 @@ Layer::SendUpdateMsg(BRegion& reg)
|
|||||||
ConvertFromScreen2(&rect);
|
ConvertFromScreen2(&rect);
|
||||||
msg.AddRect("_rect", rect );
|
msg.AddRect("_rect", rect );
|
||||||
msg.AddRect("debug_rect", reg.Frame());
|
msg.AddRect("debug_rect", reg.Frame());
|
||||||
// msg.AddInt32("_token",fViewToken);
|
|
||||||
|
|
||||||
return Owner()->Window()->SendMessageToClient(&msg);
|
return Owner()->Window()->SendMessageToClient(&msg);
|
||||||
}
|
}
|
||||||
@@ -1127,12 +1045,12 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) {
|
|||||||
copyRegion.IntersectWith(&fVisible2);
|
copyRegion.IntersectWith(&fVisible2);
|
||||||
|
|
||||||
// the region at the destination that needs invalidation
|
// the region at the destination that needs invalidation
|
||||||
GetRootLayer()->fRedrawReg.Set(dst);
|
BRegion redrawReg(dst);
|
||||||
// exclude the region drawn by the copy operation
|
// exclude the region drawn by the copy operation
|
||||||
// TODO: quick fix for our scrolling problem. FIX THIS!
|
// TODO: quick fix for our scrolling problem. FIX THIS!
|
||||||
// GetRootLayer()->fRedrawReg.Exclude(©Region);
|
// redrawReg.Exclude(©Region);
|
||||||
// apply the current clipping as well
|
// apply the current clipping as well
|
||||||
GetRootLayer()->fRedrawReg.IntersectWith(&fVisible2);
|
redrawReg.IntersectWith(&fVisible2);
|
||||||
|
|
||||||
// move the region back for the actual operation
|
// move the region back for the actual operation
|
||||||
copyRegion.OffsetBy(-xOffset, -yOffset);
|
copyRegion.OffsetBy(-xOffset, -yOffset);
|
||||||
@@ -1140,7 +1058,8 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) {
|
|||||||
GetDrawingEngine()->CopyRegion(©Region, xOffset, yOffset);
|
GetDrawingEngine()->CopyRegion(©Region, xOffset, yOffset);
|
||||||
|
|
||||||
// trigger the redraw
|
// trigger the redraw
|
||||||
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
|
GetRootLayer()->MarkForRedraw(redrawReg);
|
||||||
|
GetRootLayer()->TriggerRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1513,9 +1432,8 @@ Layer::do_ResizeBy(float dx, float dy)
|
|||||||
GetWantedRegion(invalid);
|
GetWantedRegion(invalid);
|
||||||
invalid.Include(&fFullVisible2);
|
invalid.Include(&fFullVisible2);
|
||||||
|
|
||||||
clear_visible_regions();
|
fParent->MarkForRebuild(invalid);
|
||||||
|
fParent->TriggerRebuild();
|
||||||
fParent->do_RebuildVisibleRegions(invalid, this);
|
|
||||||
|
|
||||||
// done rebuilding regions, now redraw regions that became visible
|
// done rebuilding regions, now redraw regions that became visible
|
||||||
|
|
||||||
@@ -1535,19 +1453,16 @@ Layer::do_ResizeBy(float dx, float dy)
|
|||||||
// layers that had their frame modified must be entirely redrawn.
|
// layers that had their frame modified must be entirely redrawn.
|
||||||
rezize_layer_redraw_more(redrawReg, dx, dy);
|
rezize_layer_redraw_more(redrawReg, dx, dy);
|
||||||
|
|
||||||
// add redrawReg to our RootLayer's redraw region.
|
|
||||||
// GetRootLayer()->fRedrawReg.Include(&redrawReg);
|
|
||||||
GetRootLayer()->fRedrawReg = redrawReg;
|
|
||||||
// include layer's visible region in case we want a full update on resize
|
// include layer's visible region in case we want a full update on resize
|
||||||
if (fFlags & B_FULL_UPDATE_ON_RESIZE && fVisible2.Frame().IsValid()) {
|
if (fFlags & B_FULL_UPDATE_ON_RESIZE && fVisible2.Frame().IsValid()) {
|
||||||
resize_layer_full_update_on_resize(GetRootLayer()->fRedrawReg, dx, dy);
|
resize_layer_full_update_on_resize(redrawReg, dx, dy);
|
||||||
|
|
||||||
GetRootLayer()->fRedrawReg.Include(&fVisible2);
|
redrawReg.Include(&fVisible2);
|
||||||
GetRootLayer()->fRedrawReg.Include(&oldVisible);
|
redrawReg.Include(&oldVisible);
|
||||||
}
|
}
|
||||||
// clear canvas and set invalid regions for affected WinBorders
|
|
||||||
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
|
GetRootLayer()->MarkForRedraw(redrawReg);
|
||||||
// GetRootLayer()->RequestRedraw(); // TODO: what if we pass (fParent, startFromTHIS, &redrawReg)?
|
GetRootLayer()->TriggerRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
SendViewCoordUpdateMsg();
|
SendViewCoordUpdateMsg();
|
||||||
@@ -1572,9 +1487,8 @@ void Layer::do_MoveBy(float dx, float dy)
|
|||||||
GetWantedRegion(invalid);
|
GetWantedRegion(invalid);
|
||||||
invalid.Include(&fFullVisible2);
|
invalid.Include(&fFullVisible2);
|
||||||
|
|
||||||
clear_visible_regions();
|
fParent->MarkForRebuild(invalid);
|
||||||
|
fParent->TriggerRebuild();
|
||||||
fParent->do_RebuildVisibleRegions(invalid, this);
|
|
||||||
|
|
||||||
// done rebuilding regions, now copy common parts and redraw regions that became visible
|
// done rebuilding regions, now copy common parts and redraw regions that became visible
|
||||||
|
|
||||||
@@ -1596,11 +1510,8 @@ void Layer::do_MoveBy(float dx, float dy)
|
|||||||
oldFullVisible.OffsetBy(-dx, -dy);
|
oldFullVisible.OffsetBy(-dx, -dy);
|
||||||
GetDrawingEngine()->CopyRegion(&oldFullVisible, dx, dy);
|
GetDrawingEngine()->CopyRegion(&oldFullVisible, dx, dy);
|
||||||
|
|
||||||
// add redrawReg to our RootLayer's redraw region.
|
GetRootLayer()->MarkForRedraw(redrawReg);
|
||||||
// GetRootLayer()->fRedrawReg.Include(&redrawReg);
|
GetRootLayer()->TriggerRedraw();
|
||||||
GetRootLayer()->fRedrawReg = redrawReg;
|
|
||||||
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
|
|
||||||
// GetRootLayer()->RequestRedraw(); // TODO: what if we pass (fParent, startFromTHIS, &redrawReg)?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SendViewCoordUpdateMsg();
|
SendViewCoordUpdateMsg();
|
||||||
@@ -1610,15 +1521,14 @@ void
|
|||||||
Layer::do_ScrollBy(float dx, float dy)
|
Layer::do_ScrollBy(float dx, float dy)
|
||||||
{
|
{
|
||||||
fDrawState->OffsetOrigin(BPoint(dx, dy));
|
fDrawState->OffsetOrigin(BPoint(dx, dy));
|
||||||
// fOrigin.Set(fOrigin.x + dx, fOrigin.y + dy);
|
|
||||||
|
|
||||||
if (!IsHidden() && GetRootLayer()) {
|
if (!IsHidden() && GetRootLayer()) {
|
||||||
// set the region to be invalidated.
|
// set the region to be invalidated.
|
||||||
BRegion invalid(fFullVisible2);
|
BRegion invalid(fFullVisible2);
|
||||||
|
|
||||||
clear_visible_regions();
|
MarkForRebuild(invalid);
|
||||||
|
|
||||||
rebuild_visible_regions(invalid, invalid, LastChild());
|
TriggerRebuild();
|
||||||
|
|
||||||
// for the moment we say that the whole surface needs to be redraw.
|
// for the moment we say that the whole surface needs to be redraw.
|
||||||
BRegion redrawReg(fFullVisible2);
|
BRegion redrawReg(fFullVisible2);
|
||||||
@@ -1636,10 +1546,8 @@ Layer::do_ScrollBy(float dx, float dy)
|
|||||||
// TODO: a quick fix for the scrolling problem!!! FIX THIS!
|
// TODO: a quick fix for the scrolling problem!!! FIX THIS!
|
||||||
// redrawReg.Exclude(&invalid);
|
// redrawReg.Exclude(&invalid);
|
||||||
|
|
||||||
// GetRootLayer()->fRedrawReg.Include(&redrawReg);
|
GetRootLayer()->MarkForRedraw(redrawReg);
|
||||||
GetRootLayer()->fRedrawReg = redrawReg;
|
GetRootLayer()->TriggerRedraw();
|
||||||
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
|
|
||||||
// GetRootLayer()->RequestRedraw(); // TODO: what if we pass (fParent, startFromTHIS, &redrawReg)?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dx != 0.0f || dy != 0.0f)
|
if (dx != 0.0f || dy != 0.0f)
|
||||||
@@ -1677,19 +1585,12 @@ Layer::GetWantedRegion(BRegion ®)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Layer::do_RebuildVisibleRegions(const BRegion &invalid, const Layer *startFrom)
|
|
||||||
{
|
|
||||||
BRegion localVisible(fFullVisible2);
|
|
||||||
localVisible.IntersectWith(&invalid);
|
|
||||||
rebuild_visible_regions(invalid, localVisible, startFrom);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Layer::rebuild_visible_regions(const BRegion &invalid,
|
Layer::rebuild_visible_regions(const BRegion &invalid,
|
||||||
const BRegion &parentLocalVisible,
|
const BRegion &parentLocalVisible,
|
||||||
const Layer *startFrom)
|
const Layer *startFrom)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
// no point in continuing if this layer is hidden.
|
// no point in continuing if this layer is hidden.
|
||||||
if (fHidden)
|
if (fHidden)
|
||||||
return;
|
return;
|
||||||
@@ -1735,6 +1636,43 @@ Layer::rebuild_visible_regions(const BRegion &invalid,
|
|||||||
common.Exclude(&lay->fFullVisible2);
|
common.Exclude(&lay->fFullVisible2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// include what's left after all children took what they could.
|
||||||
|
fVisible2.Include(&common);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// NOTE: I modified this method for the moment because of some issues that I have
|
||||||
|
// with the new public methods that I recently introduced.
|
||||||
|
// This code works very well, the single problem that it has it's that it
|
||||||
|
// rebuilds all the visible regions of its descendants.
|
||||||
|
// TODO: only rebuild what's needed. See above code.
|
||||||
|
// NOTE2: this does not affect the redrawing code.
|
||||||
|
|
||||||
|
// no point in continuing if this layer is hidden.
|
||||||
|
if (fHidden)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// no need to go deeper if the parent doesn't have a visible region anymore
|
||||||
|
if (!parentLocalVisible.Frame().IsValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
BRegion common;
|
||||||
|
GetWantedRegion(common);
|
||||||
|
|
||||||
|
// see how much you can take
|
||||||
|
common.IntersectWith(&parentLocalVisible);
|
||||||
|
fFullVisible2 = common;
|
||||||
|
fVisible2.MakeEmpty();
|
||||||
|
|
||||||
|
// allow this layer to hide some parts from its children
|
||||||
|
_ReserveRegions(common);
|
||||||
|
|
||||||
|
for (Layer *lay = LastChild(); lay; lay = PreviousChild()) {
|
||||||
|
lay->rebuild_visible_regions(invalid, common, lay->LastChild());
|
||||||
|
|
||||||
|
// to let children know much they can take from parent's visible region
|
||||||
|
common.Exclude(&lay->fFullVisible2);
|
||||||
|
}
|
||||||
|
|
||||||
// include what's left after all children took what they could.
|
// include what's left after all children took what they could.
|
||||||
fVisible2.Include(&common);
|
fVisible2.Include(&common);
|
||||||
}
|
}
|
||||||
@@ -1780,7 +1718,7 @@ Layer::TriggerRebuild()
|
|||||||
|
|
||||||
// localFullVisible.IntersectWith(&totalInvalidReg);
|
// localFullVisible.IntersectWith(&totalInvalidReg);
|
||||||
|
|
||||||
// clear_visible_regions();
|
clear_visible_regions();
|
||||||
|
|
||||||
rebuild_visible_regions(totalInvalidReg, localFullVisible, LastChild());
|
rebuild_visible_regions(totalInvalidReg, localFullVisible, LastChild());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,6 @@
|
|||||||
#include "RGBColor.h"
|
#include "RGBColor.h"
|
||||||
#include "ServerWindow.h"
|
#include "ServerWindow.h"
|
||||||
|
|
||||||
#define NEW_CLIPPING 1
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
B_LAYER_NONE = 1,
|
B_LAYER_NONE = 1,
|
||||||
B_LAYER_MOVE = 2,
|
B_LAYER_MOVE = 2,
|
||||||
@@ -103,9 +101,6 @@ class Layer {
|
|||||||
inline uint32 Flags() const
|
inline uint32 Flags() const
|
||||||
{ return fFlags; }
|
{ return fFlags; }
|
||||||
|
|
||||||
void Redraw(const BRegion& reg,
|
|
||||||
Layer* startFrom = NULL);
|
|
||||||
|
|
||||||
virtual void Draw(const BRect& r);
|
virtual void Draw(const BRect& r);
|
||||||
|
|
||||||
void Show(bool invalidate = true);
|
void Show(bool invalidate = true);
|
||||||
@@ -254,8 +249,6 @@ class Layer {
|
|||||||
private:
|
private:
|
||||||
void do_Hide();
|
void do_Hide();
|
||||||
void do_Show();
|
void do_Show();
|
||||||
void do_RebuildVisibleRegions(const BRegion &invalid,
|
|
||||||
const Layer *startFrom);
|
|
||||||
void do_MoveBy(float dx, float dy);
|
void do_MoveBy(float dx, float dy);
|
||||||
void do_ResizeBy(float dx, float dy);
|
void do_ResizeBy(float dx, float dy);
|
||||||
void do_ScrollBy(float dx, float dy);
|
void do_ScrollBy(float dx, float dy);
|
||||||
@@ -320,8 +313,6 @@ class Layer {
|
|||||||
RootLayer* fRootLayer;
|
RootLayer* fRootLayer;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RequestDraw(const BRegion& reg,
|
|
||||||
Layer* startFrom);
|
|
||||||
ServerWindow* SearchForServerWindow();
|
ServerWindow* SearchForServerWindow();
|
||||||
|
|
||||||
status_t SendUpdateMsg(BRegion& reg);
|
status_t SendUpdateMsg(BRegion& reg);
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ public:
|
|||||||
|
|
||||||
thread_id LockingThread() { return fAllRegionsLock.LockingThread(); }
|
thread_id LockingThread() { return fAllRegionsLock.LockingThread(); }
|
||||||
|
|
||||||
BRegion fRedrawReg;
|
// BRegion fRedrawReg;
|
||||||
BList fCopyRegList;
|
// BList fCopyRegList;
|
||||||
BList fCopyList;
|
// BList fCopyList;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class Desktop;
|
friend class Desktop;
|
||||||
|
|||||||
@@ -1160,8 +1160,6 @@ if (myRootLayer)
|
|||||||
|
|
||||||
myRootLayer->MarkForRedraw(invalidReg);
|
myRootLayer->MarkForRedraw(invalidReg);
|
||||||
myRootLayer->TriggerRedraw();
|
myRootLayer->TriggerRedraw();
|
||||||
|
|
||||||
// myRootLayer->GoRedraw(fCurrentLayer, invalReg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1229,10 +1227,6 @@ if (myRootLayer)
|
|||||||
{
|
{
|
||||||
STRACE(("ServerWindow %s: Message Enable_Updates unimplemented\n", Title()));
|
STRACE(("ServerWindow %s: Message Enable_Updates unimplemented\n", Title()));
|
||||||
fWinBorder->EnableUpdateRequests();
|
fWinBorder->EnableUpdateRequests();
|
||||||
if (fWinBorder->CulmulatedUpdateRegion().Frame().IsValid()) {
|
|
||||||
BRegion reg(fWinBorder->CulmulatedUpdateRegion());
|
|
||||||
fWinBorder->RequestDraw(reg, NULL);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_DISABLE_UPDATES:
|
case AS_DISABLE_UPDATES:
|
||||||
|
|||||||
@@ -269,8 +269,18 @@ WinBorder::UpdateEnd()
|
|||||||
fInUpdateRegion.MakeEmpty();
|
fInUpdateRegion.MakeEmpty();
|
||||||
|
|
||||||
if (fCumulativeRegion.CountRects() > 0) {
|
if (fCumulativeRegion.CountRects() > 0) {
|
||||||
BRegion reg(fCumulativeRegion);
|
GetRootLayer()->MarkForRedraw(fCumulativeRegion);
|
||||||
RequestDraw(reg, NULL);
|
GetRootLayer()->TriggerRedraw();
|
||||||
|
// RequestDraw(reg, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void
|
||||||
|
WinBorder::EnableUpdateRequests() {
|
||||||
|
fUpdateRequestsEnabled = true;
|
||||||
|
if (fCumulativeRegion.CountRects() > 0) {
|
||||||
|
GetRootLayer()->MarkForRedraw(fCumulativeRegion);
|
||||||
|
GetRootLayer()->TriggerRedraw();
|
||||||
|
// RequestDraw(reg, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,11 +764,7 @@ void
|
|||||||
WinBorder::GetWantedRegion(BRegion ®)
|
WinBorder::GetWantedRegion(BRegion ®)
|
||||||
{
|
{
|
||||||
if (fRebuildDecRegion)
|
if (fRebuildDecRegion)
|
||||||
{
|
|
||||||
set_decorator_region(Bounds());
|
set_decorator_region(Bounds());
|
||||||
// TODO? the decorator should be in WinBorder coordinates?? It's easier not to.
|
|
||||||
//ConvertToScreen2(&fDecRegion);
|
|
||||||
}
|
|
||||||
|
|
||||||
BRect screenFrame(Bounds());
|
BRect screenFrame(Bounds());
|
||||||
ConvertToScreen2(&screenFrame);
|
ConvertToScreen2(&screenFrame);
|
||||||
|
|||||||
@@ -68,8 +68,7 @@ class WinBorder : public Layer {
|
|||||||
{ return fInUpdateRegion; }
|
{ return fInUpdateRegion; }
|
||||||
inline const BRegion& CulmulatedUpdateRegion() const
|
inline const BRegion& CulmulatedUpdateRegion() const
|
||||||
{ return fCumulativeRegion; }
|
{ return fCumulativeRegion; }
|
||||||
inline void EnableUpdateRequests()
|
void EnableUpdateRequests();
|
||||||
{ fUpdateRequestsEnabled = true; }
|
|
||||||
inline void DisableUpdateRequests()
|
inline void DisableUpdateRequests()
|
||||||
{ fUpdateRequestsEnabled = false; }
|
{ fUpdateRequestsEnabled = false; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user