Removed RootLayer::EnqueueMessage(). Added support for BWindow's EnableUpdates(), DisableUpdates(), NeedsUpdate() and SendBehind(). The last one does not work as expected, for the moment it sends the window to back, just as Activate(false) does.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-10-30 11:33:31 +00:00
parent 9783d238c2
commit ac89958f6e
6 changed files with 40 additions and 32 deletions
+1 -1
View File
@@ -1609,7 +1609,7 @@ if (fOwner->cnt != 1)
if (updateReg.CountRects() > 0) {
fOwner->fCumulativeRegion.Include(&updateReg);
if (!fOwner->InUpdate() && !fOwner->fRequestSent) {
if (fOwner->fUpdateRequestsEnabled && !fOwner->InUpdate() && !fOwner->fRequestSent) {
fOwner->fInUpdateRegion = fOwner->fCumulativeRegion;
fOwner->cnt++;
if (fOwner->cnt != 1)
-14
View File
@@ -309,15 +309,6 @@ RootLayer::GoInvalidate(Layer *layer, const BRegion &region)
Unlock();
}
status_t
RootLayer::EnqueueMessage(BPrivate::PortLink &message)
{
message.SetSenderPort(fListenPort);
message.Flush();
return B_OK;
}
void
RootLayer::GoRedraw(Layer *layer, const BRegion &region)
{
@@ -1137,11 +1128,6 @@ RootLayer::MouseEventHandler(BMessage *msg)
}
case B_MOUSE_MOVED: {
//printf("RootLayer::MouseEventHandler(B_MOUSE_MOVED)\n");
// Attached data:
// 1) int64 - time of mouse click
// 2) float - x coordinate of mouse click
// 3) float - y coordinate of mouse click
// 4) int32 - buttons down
BPoint where(0,0);
-1
View File
@@ -130,7 +130,6 @@ public:
void Unlock() { fAllRegionsLock.Unlock(); }
bool IsLocked() { return fAllRegionsLock.IsLocked(); }
void RunThread();
status_t EnqueueMessage(BPrivate::PortLink &message);
void GoInvalidate(Layer *layer, const BRegion &region);
void GoRedraw(Layer *layer, const BRegion &region);
void GoChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel);
+29 -6
View File
@@ -1268,32 +1268,55 @@ myRootLayer->Unlock();
Hide();
break;
}
#if 0
case AS_SEND_BEHIND:
{
// TODO: Implement AS_SEND_BEHIND
STRACE(("ServerWindow %s: Message Send_Behind unimplemented\n", Title()));
int32 token;
team_id teamID;
WinBorder *behindOf;
status_t status = B_NAME_NOT_FOUND;
link.Read<int32>(&token);
link.Read<team_id>(&teamID);
if ((behindOf = gDesktop->FindWinBorderByClientToken(token, teamID))) {
fWinBorder->GetRootLayer()->Lock();
// TODO: move to back ATM. Fix this later!
fWinBorder->GetRootLayer()->SetActive(fWinBorder, false);
fWinBorder->GetRootLayer()->Unlock();
status = B_OK;
}
fLink.StartMessage(status);
fLink.Flush();
break;
}
case AS_ENABLE_UPDATES:
{
// TODO: Implement AS_ENABLE_UPDATES
STRACE(("ServerWindow %s: Message Enable_Updates unimplemented\n", Title()));
fWinBorder->EnableUpdateRequests();
if (fWinBorder->CulmulatedUpdateRegion().Frame().IsValid()) {
BRegion reg(fWinBorder->CulmulatedUpdateRegion());
fWinBorder->RequestDraw(reg, NULL);
}
break;
}
case AS_DISABLE_UPDATES:
{
// TODO: Implement AS_DISABLE_UPDATES
STRACE(("ServerWindow %s: Message Disable_Updates unimplemented\n", Title()));
fWinBorder->DisableUpdateRequests();
break;
}
case AS_NEEDS_UPDATE:
{
// TODO: Implement AS_NEEDS_UPDATE
STRACE(("ServerWindow %s: Message Needs_Update unimplemented\n", Title()));
if (fWinBorder->CulmulatedUpdateRegion().Frame().IsValid())
fLink.StartMessage(B_OK);
else
fLink.StartMessage(B_ERROR);
fLink.Flush();
break;
}
#endif
case AS_SET_WINDOW_TITLE:
{
char* newTitle;
+2 -5
View File
@@ -79,14 +79,11 @@ WinBorder::WinBorder(const BRect &frame,
fIsClosing(false),
fIsMinimizing(false),
fIsZooming(false),
fIsDragging(false),
fBringToFrontOnRelease(false),
fIsResizing(false),
fIsSlidingTab(false),
fIsDragging(false),
fUpdateRequestsEnabled(true),
fInUpdate(false),
fRequestSent(false),
+8 -5
View File
@@ -70,6 +70,10 @@ class WinBorder : public Layer {
{ return fInUpdateRegion; }
inline const BRegion& CulmulatedUpdateRegion() const
{ return fCumulativeRegion; }
inline void EnableUpdateRequests()
{ fUpdateRequestsEnabled = true; }
inline void DisableUpdateRequests()
{ fUpdateRequestsEnabled = false; }
void SetSizeLimits(float minWidth,
float maxWidth,
@@ -157,14 +161,13 @@ class WinBorder : public Layer {
bool fIsClosing;
bool fIsMinimizing;
bool fIsZooming;
bool fIsResizing;
bool fIsSlidingTab;
bool fIsDragging;
bool fBringToFrontOnRelease;
bool fIsResizing;
bool fIsSlidingTab;
bool fUpdateRequestsEnabled;
bool fInUpdate;
bool fRequestSent;