* When a window changed its look/title/... we need to make sure the dirty region
we got in _RebuildAndRedrawAfterWindowChange() does not contain hidden parts. * This eliminates the updates as seen in the WindowInvalidation test app, as well as it fixes bug #4257. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32471 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
572d609ff0
commit
b53a9cf25c
@ -2836,15 +2836,34 @@ Desktop::_SetBackground(BRegion& background)
|
||||
|
||||
//! The all window lock must be held when calling this function.
|
||||
void
|
||||
Desktop::_RebuildAndRedrawAfterWindowChange(Window* window, BRegion& dirty)
|
||||
Desktop::_RebuildAndRedrawAfterWindowChange(Window* changedWindow,
|
||||
BRegion& dirty)
|
||||
{
|
||||
if (!window->IsVisible() || dirty.CountRects() == 0)
|
||||
if (!changedWindow->IsVisible() || dirty.CountRects() == 0)
|
||||
return;
|
||||
|
||||
BRegion stillAvailableOnScreen;
|
||||
_RebuildClippingForAllWindows(stillAvailableOnScreen);
|
||||
// The following loop is pretty much a copy of
|
||||
// _RebuildClippingForAllWindows(), but will also
|
||||
// take care about restricting our dirty region.
|
||||
|
||||
// figure out what the entire screen area is
|
||||
BRegion stillAvailableOnScreen(fScreenRegion);
|
||||
|
||||
// set clipping of each window
|
||||
for (Window* window = _CurrentWindows().LastWindow(); window != NULL;
|
||||
window = window->PreviousWindow(fCurrentWorkspace)) {
|
||||
if (!window->IsHidden()) {
|
||||
if (window == changedWindow)
|
||||
dirty.IntersectWith(&stillAvailableOnScreen);
|
||||
|
||||
window->SetClipping(&stillAvailableOnScreen);
|
||||
// that windows region is not available on screen anymore
|
||||
stillAvailableOnScreen.Exclude(&window->VisibleRegion());
|
||||
}
|
||||
}
|
||||
|
||||
_SetBackground(stillAvailableOnScreen);
|
||||
_WindowChanged(window);
|
||||
_WindowChanged(changedWindow);
|
||||
|
||||
_TriggerWindowRedrawing(dirty);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user