diff --git a/src/servers/app/server/Desktop.cpp b/src/servers/app/server/Desktop.cpp index 17d1011694..e88e3f8cc4 100644 --- a/src/servers/app/server/Desktop.cpp +++ b/src/servers/app/server/Desktop.cpp @@ -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 //--------------------------------------------------------------------------- diff --git a/src/servers/app/server/Desktop.h b/src/servers/app/server/Desktop.h index 7bb211ffa5..4a7365e92e 100644 --- a/src/servers/app/server/Desktop.h +++ b/src/servers/app/server/Desktop.h @@ -20,7 +20,7 @@ // DEALINGS IN THE SOFTWARE. // // File Name: Desktop.cpp -// Author: Adi Oanca +// Author: Adi Oanca // 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;