Damn vi. I'll use nano next time. Sorry about my previous blank message.
Trying to make windows visible again. :-)) Made decorator until now. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8033 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -135,8 +135,10 @@ void Layer::AddChild(Layer *layer, ServerWindow *serverWin)
|
||||
// if no RootLayer, there is no need to set any parameters.
|
||||
// they will be set when the root Layer for this tree will be added
|
||||
// to the main tree structure.
|
||||
if (fRootLayer == NULL)
|
||||
if (fRootLayer == NULL){
|
||||
STRACE(("Layer(%s)::AddChild(%s) END\n", GetName(), layer->GetName()));
|
||||
return;
|
||||
}
|
||||
|
||||
// 2) set some fields for this new layer and its children.
|
||||
Layer *c = layer; //c = short for: current
|
||||
@@ -415,7 +417,7 @@ void Layer::Redraw(const BRegion& reg, Layer *startFrom)
|
||||
if (pReg->CountRects() > 0)
|
||||
RequestDraw(reg, startFrom);
|
||||
|
||||
STRACE(("Layer::Redraw ENDED\n"));
|
||||
STRACE(("Layer(%s)::Redraw() ENDED\n", GetName()));
|
||||
}
|
||||
|
||||
void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
||||
@@ -433,31 +435,12 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
||||
fUpdateReg.IntersectWith(®);
|
||||
|
||||
if (fUpdateReg.CountRects() > 0){
|
||||
if (fServerWin){
|
||||
// clear background, *only IF* our view color is different to B_TRANSPARENT_COLOR!
|
||||
// TODO: DO That!
|
||||
// TODO: UNcomment!!!
|
||||
// TODO !!! UPDATE code !!!
|
||||
/*
|
||||
BMessage msg;
|
||||
msg.what = _UPDATE_;
|
||||
msg.AddInt32("_token", fViewToken);
|
||||
msg.AddRect("_rect", ConvertFromTop(reg.Frame()) );
|
||||
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
||||
Draw(fUpdateReg.Frame());
|
||||
fDriver->ConstrainClippingRegion(NULL);
|
||||
|
||||
// for test purposes only!
|
||||
msg.AddRect("_rect2", reg.Frame());
|
||||
|
||||
fServerWin->SendMessageToClient( &msg );
|
||||
*/
|
||||
}
|
||||
else{
|
||||
// NOTE: do not clear background for internal server layers!
|
||||
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
||||
Draw(fUpdateReg.Frame());
|
||||
fDriver->ConstrainClippingRegion(NULL);
|
||||
|
||||
fUpdateReg.MakeEmpty();
|
||||
}
|
||||
// TODO: (WARNING!): For the Update code is MUST not be emptied!!!
|
||||
fUpdateReg.MakeEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ void ServerWindow::Show(void)
|
||||
if(!fWinBorder->IsHidden())
|
||||
return;
|
||||
|
||||
STRACE(("ServerWindow %s: Show\n",fTitle.String()));
|
||||
STRACE(("ServerWindow (%s): Show()\n",fTitle.String()));
|
||||
if(fWinBorder)
|
||||
{
|
||||
RootLayer *rl = fWinBorder->GetRootLayer();
|
||||
@@ -289,9 +289,9 @@ void ServerWindow::Show(void)
|
||||
rl->fMainLock.Lock();
|
||||
STRACE(("ServerWindow(%s)::Show() - Main lock acquired\n", fWinBorder->GetName()));
|
||||
|
||||
// manually set fWinBorder->fHidden to false because Layer's version also calls FullInvalidate.
|
||||
fWinBorder->fHidden=false;
|
||||
|
||||
// TODO: 'false' couldn't this be made otherwise???
|
||||
fWinBorder->Show(false);
|
||||
|
||||
if ( (fFeel == B_FLOATING_SUBSET_WINDOW_FEEL || fFeel == B_MODAL_SUBSET_WINDOW_FEEL)
|
||||
&& fWinBorder->MainWinBorder() == NULL)
|
||||
{
|
||||
@@ -319,6 +319,10 @@ void ServerWindow::Show(void)
|
||||
desktop->fGeneralLock.Unlock();
|
||||
STRACE(("ServerWindow(%s)::Show() - General lock released\n", fWinBorder->GetName()));
|
||||
}
|
||||
else
|
||||
{
|
||||
debugger("WARNING: NULL fWinBorder\n");
|
||||
}
|
||||
}
|
||||
|
||||
//! Hides the window's WinBorder
|
||||
@@ -1511,13 +1515,13 @@ void ServerWindow::DispatchMessage(int32 code)
|
||||
}
|
||||
case AS_SHOW_WINDOW:
|
||||
{
|
||||
STRACE(("ServerWindow %s: Message AS_SHOW\n",fTitle.String()));
|
||||
STRACE(("ServerWindow %s: Message AS_SHOW_WINDOW\n",fTitle.String()));
|
||||
Show();
|
||||
break;
|
||||
}
|
||||
case AS_HIDE_WINDOW:
|
||||
{
|
||||
STRACE(("ServerWindow %s: Message AS_HIDE\n",fTitle.String()));
|
||||
STRACE(("ServerWindow %s: Message AS_HIDE_WINDOW\n",fTitle.String()));
|
||||
Hide();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
// TODO: Document this file completely
|
||||
|
||||
// Toggle general function call output
|
||||
//#define DEBUG_WINBORDER
|
||||
#define DEBUG_WINBORDER
|
||||
|
||||
// toggle
|
||||
//#define DEBUG_WINBORDER_MOUSE
|
||||
@@ -344,9 +344,6 @@ void WinBorder::Draw(const BRect &r)
|
||||
// if we have a visible region, it is decorator's one.
|
||||
if(fDecorator)
|
||||
{
|
||||
fUpdateReg = fVisible;
|
||||
// restrict Decorator drawing to the update region only.
|
||||
fDriver->ConstrainClippingRegion(&fUpdateReg);
|
||||
/*
|
||||
fUpdateReg.PrintToStream();
|
||||
RGBColor c(128, 56, 98);
|
||||
@@ -355,9 +352,22 @@ void WinBorder::Draw(const BRect &r)
|
||||
snooze(1000000);
|
||||
*/
|
||||
fDecorator->Draw(fUpdateReg.Frame());
|
||||
// remove the additional clipping region.
|
||||
fDriver->ConstrainClippingRegion(NULL);
|
||||
}
|
||||
// clear background, *only IF* our view color is different to B_TRANSPARENT_COLOR!
|
||||
// TODO: DO That!
|
||||
// TODO: UNcomment!!!
|
||||
// TODO !!! UPDATE code !!!
|
||||
/*
|
||||
BMessage msg;
|
||||
msg.what = _UPDATE_;
|
||||
msg.AddInt32("_token", fViewToken);
|
||||
msg.AddRect("_rect", ConvertFromTop(reg.Frame()) );
|
||||
|
||||
// for test purposes only!
|
||||
msg.AddRect("_rect2", reg.Frame());
|
||||
|
||||
fServerWin->SendMessageToClient( &msg );
|
||||
*/
|
||||
}
|
||||
|
||||
void WinBorder::MoveBy(float x, float y)
|
||||
|
||||
Reference in New Issue
Block a user