Layer::SendUpdateMsg() will tell us if sending _UPDATE_ message succeded. We'll use that information to clear WinBorder::fCumulativeRegion(server per-window dirty region) only on success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14493 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1535,9 +1535,14 @@ Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|||||||
fOwner->cnt++;
|
fOwner->cnt++;
|
||||||
if (fOwner->cnt != 1)
|
if (fOwner->cnt != 1)
|
||||||
CRITICAL("Layer::RequestDraw(): fOwner->cnt != 1 -> Not Allowed!");
|
CRITICAL("Layer::RequestDraw(): fOwner->cnt != 1 -> Not Allowed!");
|
||||||
fOwner->fCumulativeRegion.MakeEmpty();
|
fOwner->fRequestSent = true; // this is here to avoid a possible de-synchronization
|
||||||
fOwner->fRequestSent = true;
|
if (SendUpdateMsg(fOwner->fInUpdateRegion) == B_OK) {
|
||||||
SendUpdateMsg(fOwner->fInUpdateRegion);
|
fOwner->fCumulativeRegion.MakeEmpty();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fOwner->fRequestSent = false;
|
||||||
|
fOwner->fInUpdateRegion.MakeEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1587,9 +1592,14 @@ if (fOwner->cnt != 1)
|
|||||||
fOwner->cnt++;
|
fOwner->cnt++;
|
||||||
if (fOwner->cnt != 1)
|
if (fOwner->cnt != 1)
|
||||||
CRITICAL("Layer::RequestDraw(): fOwner->cnt != 1 -> Not Allowed!");
|
CRITICAL("Layer::RequestDraw(): fOwner->cnt != 1 -> Not Allowed!");
|
||||||
fOwner->fCumulativeRegion.MakeEmpty();
|
fOwner->fRequestSent = true; // this is here to avoid a possible de-synchronization
|
||||||
fOwner->fRequestSent = true;
|
if (SendUpdateMsg(fOwner->fInUpdateRegion) == B_OK) {
|
||||||
SendUpdateMsg(fOwner->fInUpdateRegion);
|
fOwner->fCumulativeRegion.MakeEmpty();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fOwner->fRequestSent = false;
|
||||||
|
fOwner->fInUpdateRegion.MakeEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1765,7 +1775,7 @@ Layer::SearchForServerWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! Sends an _UPDATE_ message to the client BWindow
|
//! Sends an _UPDATE_ message to the client BWindow
|
||||||
void
|
status_t
|
||||||
Layer::SendUpdateMsg(BRegion& reg)
|
Layer::SendUpdateMsg(BRegion& reg)
|
||||||
{
|
{
|
||||||
BMessage msg;
|
BMessage msg;
|
||||||
@@ -1780,7 +1790,7 @@ Layer::SendUpdateMsg(BRegion& reg)
|
|||||||
msg.AddRect("debug_rect", reg.Frame());
|
msg.AddRect("debug_rect", reg.Frame());
|
||||||
// msg.AddInt32("_token",fViewToken);
|
// msg.AddInt32("_token",fViewToken);
|
||||||
|
|
||||||
fOwner->Window()->SendMessageToClient(&msg);
|
return Owner()->Window()->SendMessageToClient(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddToViewsWithInvalidCoords
|
// AddToViewsWithInvalidCoords
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ friend class OffscreenWinBorder;
|
|||||||
Layer* startFrom);
|
Layer* startFrom);
|
||||||
ServerWindow* SearchForServerWindow();
|
ServerWindow* SearchForServerWindow();
|
||||||
|
|
||||||
void SendUpdateMsg(BRegion& reg);
|
status_t SendUpdateMsg(BRegion& reg);
|
||||||
void AddToViewsWithInvalidCoords() const;
|
void AddToViewsWithInvalidCoords() const;
|
||||||
void SendViewCoordUpdateMsg() const;
|
void SendViewCoordUpdateMsg() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user