When setting view flags which toggle the B_DRAW_ON_CHILDREN flag, immediately

trigger a recalculation of the view clipping region (it will now include
children).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29755 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-03-28 14:12:55 +00:00
parent 53eaeede6f
commit 8ee34f96da
1 changed files with 11 additions and 0 deletions

View File

@ -1577,9 +1577,20 @@ fDesktop->LockSingleWindow();
{
uint32 flags;
link.Read<uint32>(&flags);
// The views clipping changes when the B_DRAW_ON_CHILDREN flag is
// toggled.
bool updateClipping = (flags & B_DRAW_ON_CHILDREN)
^ (fCurrentView->Flags() & B_DRAW_ON_CHILDREN);
fCurrentView->SetFlags(flags);
_UpdateDrawState(fCurrentView);
if (updateClipping) {
fCurrentView->RebuildClipping(false);
fCurrentDrawingRegionValid = false;
}
DTRACE(("ServerWindow %s: Message AS_VIEW_SET_FLAGS: "
"View: %s -> flags: %lu\n", Title(), fCurrentView->Name(),
flags));