Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8335 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
966c3cc86b
commit
eb93dd6e36
@ -58,8 +58,6 @@ Desktop::Desktop(void)
|
||||
{
|
||||
fDragMessage = NULL;
|
||||
fActiveRootLayer = NULL;
|
||||
fFrontWinBorder = NULL;
|
||||
fFocusWinBorder = NULL;
|
||||
fMouseTarget = NULL;
|
||||
fActiveScreen = NULL;
|
||||
fScreenShotIndex = 1;
|
||||
@ -198,14 +196,8 @@ void Desktop::SetActiveRootLayer(RootLayer* rl)
|
||||
return;
|
||||
|
||||
fActiveRootLayer = rl;
|
||||
|
||||
// TODO: fix... or not?
|
||||
// also set the new front and focus
|
||||
// SetFrontWinBorder(fActiveRootLayer->ActiveWorkspace()->FrontLayer());
|
||||
// SetFocusWinBorder(fActiveRootLayer->ActiveWorkspace()->FocusLayer());
|
||||
|
||||
// TODO: other tasks required when this happens. I don't know them now.
|
||||
// Rebuild & Invalidate
|
||||
// TODO:
|
||||
// hide the mouse in the old ActiveRootLayer
|
||||
// show the mouse in new ActiveRootLayer
|
||||
fActiveRootLayer->FullInvalidate(fActiveRootLayer->Bounds());
|
||||
@ -299,64 +291,6 @@ bool Desktop::HasWinBorder(WinBorder* winBorder)
|
||||
return fWinBorderList.HasItem(winBorder);
|
||||
}
|
||||
|
||||
void Desktop::SetFrontWinBorder(WinBorder* winBorder)
|
||||
{
|
||||
fFrontWinBorder = winBorder;
|
||||
STRACE(("Desktop::SetFrontWinBorder() unimplemented!\n"));
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
// TODO: remove shortly?
|
||||
void Desktop::SetFocusWinBorder(WinBorder* winBorder)
|
||||
{
|
||||
if (FocusWinBorder() == winBorder && (winBorder && !winBorder->IsHidden()))
|
||||
return;
|
||||
|
||||
fFocusWinBorder = FocusWinBorder();
|
||||
|
||||
// NOTE: we assume both, the old and new focus layer are in the active workspace
|
||||
WinBorder *newFocus = NULL;
|
||||
|
||||
if(fFocusWinBorder)
|
||||
fFocusWinBorder->HighlightDecorator(false);
|
||||
|
||||
if(winBorder)
|
||||
{
|
||||
// TODO: NO! this call is to determine the correct order! NOT to rebuild/redraw anything!
|
||||
// TODO: WinBorder::SetFront... will do that - both!
|
||||
// TODO: modify later
|
||||
// TODO: same applies for the focus state - RootLayer::SetFocus also does redraw
|
||||
// Workspace::SetFocus - Only determines the focus! Just like above!
|
||||
|
||||
// newFocus = winBorder->GetRootLayer()->ActiveWorkspace()->SetFocusLayer(winBorder);
|
||||
// newFocus->SetFocus(true);
|
||||
|
||||
Workspace *aws;
|
||||
|
||||
aws = winBorder->GetRootLayer()->ActiveWorkspace();
|
||||
aws->SearchAndSetNewFocus(winBorder);
|
||||
|
||||
//why do put this line? Eh... I will remove it later...
|
||||
newFocus = aws->FocusLayer();
|
||||
|
||||
aws->FocusLayer()->HighlightDecorator(true);
|
||||
|
||||
aws->Invalidate();
|
||||
}
|
||||
|
||||
fFocusWinBorder = newFocus;
|
||||
}
|
||||
|
||||
WinBorder* Desktop::FrontWinBorder(void) const
|
||||
{
|
||||
return fActiveRootLayer->ActiveWorkspace()->FrontLayer();
|
||||
}
|
||||
|
||||
WinBorder* Desktop::FocusWinBorder(void) const
|
||||
{
|
||||
return fActiveRootLayer->ActiveWorkspace()->FocusLayer();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Input related methods
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -20,7 +20,7 @@
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// File Name: Desktop.cpp
|
||||
// Author: Adi Oanca <adioanca@myrealbox.com>
|
||||
// Author: Adi Oanca <adioanca@mymail.ro>
|
||||
// Description: Class used to encapsulate desktop management
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
@ -68,11 +68,7 @@ public:
|
||||
void AddWinBorder(WinBorder *winBorder);
|
||||
void RemoveWinBorder(WinBorder *winBorder);
|
||||
bool HasWinBorder(WinBorder *winBorder);
|
||||
void SetFrontWinBorder(WinBorder *winBorder);
|
||||
void SetFocusWinBorder(WinBorder *winBorder);
|
||||
WinBorder *FrontWinBorder(void) const;
|
||||
WinBorder *FocusWinBorder(void) const;
|
||||
|
||||
|
||||
// Input related methods
|
||||
void MouseEventHandler(PortMessage *msg);
|
||||
void KeyboardEventHandler(PortMessage *msg);
|
||||
@ -110,14 +106,10 @@ private:
|
||||
|
||||
BList fRootLayerList;
|
||||
RootLayer *fActiveRootLayer;
|
||||
WinBorder *fFrontWinBorder;
|
||||
WinBorder *fFocusWinBorder;
|
||||
|
||||
WinBorder *fMouseTarget;
|
||||
|
||||
BList fScreenList;
|
||||
|
||||
// '1' or 'n' Screen(s). Not sure it's needed though.
|
||||
int32 fScreenMode;
|
||||
Screen *fActiveScreen;
|
||||
|
||||
scroll_bar_info fScrollBarInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user