addapted to new clipping code

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2005-07-02 10:37:53 +00:00
parent b72bef8630
commit 4a9bbc7d20
2 changed files with 23 additions and 0 deletions

View File

@ -786,7 +786,11 @@ bool RootLayer::SetActiveWorkspace(int32 index)
get_workspace_windows();
if (WorkspacesLayer() != NULL)
#ifndef NEW_CLIPPING
GoRedraw(WorkspacesLayer(), WorkspacesLayer()->fVisible);
#else
GoRedraw(WorkspacesLayer(), WorkspacesLayer()->VisibleRegion());
#endif
// send the workspace changed message for the new workspace
{
@ -1924,7 +1928,11 @@ RootLayer::show_winBorder(WinBorder *winBorder)
show_final_scene(exFocus, exActive);
if (WorkspacesLayer())
#ifndef NEW_CLIPPING
GoRedraw(WorkspacesLayer(), fFullVisible);
#else
GoRedraw(WorkspacesLayer(), FullVisible());
#endif
}
@ -1957,7 +1965,11 @@ RootLayer::hide_winBorder(WinBorder *winBorder)
show_final_scene(exFocus, exActive);
if (WorkspacesLayer())
#ifndef NEW_CLIPPING
GoRedraw(WorkspacesLayer(), fFullVisible);
#else
GoRedraw(WorkspacesLayer(), FullVisible());
#endif
}

View File

@ -147,7 +147,11 @@ WorkspacesLayer::_DrawWorkspace(int32 index)
// draw windows
#ifndef NEW_CLIPPING
BRegion backgroundRegion = fVisible;
#else
BRegion backgroundRegion = VisibleRegion();
#endif
// ToDo: would be nice to get the real update region here
if (workspace != NULL) {
@ -173,7 +177,14 @@ WorkspacesLayer::_DrawWorkspace(int32 index)
fDriver->ConstrainClippingRegion(&backgroundRegion);
fDriver->FillRect(rect, color);
// TODO: ConstrainClippingRegion() should accept a const parameter !!
#ifndef NEW_CLIPPING
fDriver->ConstrainClippingRegion(&fVisible);
#else
BRegion cRegion(VisibleRegion());
fDriver->ConstrainClippingRegion(&cRegion);
#endif
}