app_server: actually invalidate decorator area on window close

More completely fixes #12085

Change-Id: I73bf987f06422bebbfc739d3700c11edad928646
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2621
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit a16c358d59)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2634
This commit is contained in:
Adrien Destugues 2020-05-09 13:02:45 +02:00 committed by waddlesplash
parent 22337d8f4b
commit 693e2f4fb4

View File

@ -2098,9 +2098,10 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
if (fCurrentStack->RemoveWindow(this) == false)
return false;
BRegion invalidatedRegion;
::Decorator* decorator = fCurrentStack->Decorator();
if (decorator != NULL) {
decorator->RemoveTab(index);
decorator->RemoveTab(index, &invalidatedRegion);
decorator->SetTopTab(fCurrentStack->LayerOrder().CountItems() - 1);
}
@ -2120,8 +2121,9 @@ Window::DetachFromWindowStack(bool ownStackNeeded)
SetFocus(IsFocus());
if (remainingTop != NULL) {
invalidatedRegion.Include(&remainingTop->VisibleRegion());
fDesktop->RebuildAndRedrawAfterWindowChange(remainingTop,
remainingTop->VisibleRegion());
invalidatedRegion);
}
return true;
}