Ok, ok if we redrawn the complete visible region anyway we don't have to calculate any dirt.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42569 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2011-08-04 05:57:56 +00:00
parent 38a8938d9f
commit 747d2bb6dc
+4 -6
View File
@@ -2089,10 +2089,9 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
if (fCurrentStack->RemoveWindow(this) == false) if (fCurrentStack->RemoveWindow(this) == false)
return false; return false;
BRegion dirty;
::Decorator* decorator = fCurrentStack->Decorator(); ::Decorator* decorator = fCurrentStack->Decorator();
if (decorator != NULL) { if (decorator != NULL) {
decorator->RemoveTab(index, &dirty); decorator->RemoveTab(index);
decorator->SetTopTap(fCurrentStack->LayerOrder().CountItems() - 1); decorator->SetTopTap(fCurrentStack->LayerOrder().CountItems() - 1);
} }
@@ -2102,7 +2101,7 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
decorator->SetDrawingEngine(remainingTop->fDrawingEngine); decorator->SetDrawingEngine(remainingTop->fDrawingEngine);
// propagate focus to the decorator // propagate focus to the decorator
remainingTop->SetFocus(remainingTop->IsFocus()); remainingTop->SetFocus(remainingTop->IsFocus());
remainingTop->SetLook(remainingTop->Look(), &dirty); remainingTop->SetLook(remainingTop->Look(), NULL);
} }
fCurrentStack = NULL; fCurrentStack = NULL;
@@ -2112,9 +2111,8 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
SetFocus(IsFocus()); SetFocus(IsFocus());
if (remainingTop != NULL) { if (remainingTop != NULL) {
dirty.Include(&remainingTop->VisibleRegion()); fDesktop->RebuildAndRedrawAfterWindowChange(remainingTop,
dirty.IntersectWith(&remainingTop->VisibleRegion()); remainingTop->VisibleRegion());
fDesktop->RebuildAndRedrawAfterWindowChange(remainingTop, dirty);
} }
return true; return true;
} }