* Don't let the app_server trigger a content draw if the kWindowScreenFlag is
set. This fixes the white background when starting ParticlesII. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32305 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+31
-18
@@ -231,7 +231,7 @@ Window::GetFullRegion(BRegion* region)
|
|||||||
region->Include(fFrame);
|
region->Include(fFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetBorderRegion
|
|
||||||
void
|
void
|
||||||
Window::GetBorderRegion(BRegion* region)
|
Window::GetBorderRegion(BRegion* region)
|
||||||
{
|
{
|
||||||
@@ -577,12 +577,15 @@ Window::GetEffectiveDrawingRegion(View* view, BRegion& region)
|
|||||||
if (!fEffectiveDrawingRegionValid) {
|
if (!fEffectiveDrawingRegionValid) {
|
||||||
fEffectiveDrawingRegion = VisibleContentRegion();
|
fEffectiveDrawingRegion = VisibleContentRegion();
|
||||||
if (fUpdateRequested && !fInUpdate) {
|
if (fUpdateRequested && !fInUpdate) {
|
||||||
// we requested an update, but the client has not started it yet,
|
// We requested an update, but the client has not started it yet,
|
||||||
// so it is only allowed to draw outside the pending update sessions region
|
// so it is only allowed to draw outside the pending update sessions
|
||||||
fEffectiveDrawingRegion.Exclude(&(fPendingUpdateSession->DirtyRegion()));
|
// region
|
||||||
|
fEffectiveDrawingRegion.Exclude(
|
||||||
|
&fPendingUpdateSession->DirtyRegion());
|
||||||
} else if (fInUpdate) {
|
} else if (fInUpdate) {
|
||||||
// enforce the dirty region of the update session
|
// enforce the dirty region of the update session
|
||||||
fEffectiveDrawingRegion.IntersectWith(&fCurrentUpdateSession->DirtyRegion());
|
fEffectiveDrawingRegion.IntersectWith(
|
||||||
|
&fCurrentUpdateSession->DirtyRegion());
|
||||||
} else {
|
} else {
|
||||||
// not in update, the view can draw everywhere
|
// not in update, the view can draw everywhere
|
||||||
//printf("Window(%s)::GetEffectiveDrawingRegion(for %s) - outside update\n", Title(), view->Name());
|
//printf("Window(%s)::GetEffectiveDrawingRegion(for %s) - outside update\n", Title(), view->Name());
|
||||||
@@ -1503,6 +1506,18 @@ Window::SetFlags(uint32 flags, BRegion* updateRegion)
|
|||||||
fDecorator->GetSizeLimits(&fMinWidth, &fMinHeight, &fMaxWidth, &fMaxHeight);
|
fDecorator->GetSizeLimits(&fMinWidth, &fMinHeight, &fMaxWidth, &fMaxHeight);
|
||||||
_ObeySizeLimits();
|
_ObeySizeLimits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: not sure if we want to do this
|
||||||
|
#if 0
|
||||||
|
if ((fOriginalFlags & kWindowScreenFlag) != (flags & kWindowScreenFlag)) {
|
||||||
|
// TODO: disabling needs to be nestable (or we might lose the previous
|
||||||
|
// update state)
|
||||||
|
if ((flags & kWindowScreenFlag) != 0)
|
||||||
|
DisableUpdateRequests();
|
||||||
|
else
|
||||||
|
EnableUpdateRequests();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1824,8 +1839,7 @@ Window::IsFloatingFeel(window_feel feel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*static*/
|
/*static*/ uint32
|
||||||
uint32
|
|
||||||
Window::ValidWindowFlags()
|
Window::ValidWindowFlags()
|
||||||
{
|
{
|
||||||
return B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
|
return B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
|
||||||
@@ -1842,8 +1856,7 @@ Window::ValidWindowFlags()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*static*/
|
/*static*/ uint32
|
||||||
uint32
|
|
||||||
Window::ValidWindowFlags(window_feel feel)
|
Window::ValidWindowFlags(window_feel feel)
|
||||||
{
|
{
|
||||||
uint32 flags = ValidWindowFlags();
|
uint32 flags = ValidWindowFlags();
|
||||||
@@ -1857,7 +1870,6 @@ Window::ValidWindowFlags(window_feel feel)
|
|||||||
// #pragma mark - private
|
// #pragma mark - private
|
||||||
|
|
||||||
|
|
||||||
// _ShiftPartOfRegion
|
|
||||||
void
|
void
|
||||||
Window::_ShiftPartOfRegion(BRegion* region, BRegion* regionToShift,
|
Window::_ShiftPartOfRegion(BRegion* region, BRegion* regionToShift,
|
||||||
int32 xOffset, int32 yOffset)
|
int32 xOffset, int32 yOffset)
|
||||||
@@ -1881,7 +1893,10 @@ Window::_ShiftPartOfRegion(BRegion* region, BRegion* regionToShift,
|
|||||||
void
|
void
|
||||||
Window::_TriggerContentRedraw(BRegion& dirtyContentRegion)
|
Window::_TriggerContentRedraw(BRegion& dirtyContentRegion)
|
||||||
{
|
{
|
||||||
if (IsVisible() && dirtyContentRegion.CountRects() > 0) {
|
if (!IsVisible() || dirtyContentRegion.CountRects() == 0
|
||||||
|
|| (fFlags & kWindowScreenFlag) != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
// put this into the pending dirty region
|
// put this into the pending dirty region
|
||||||
// to eventually trigger a client redraw
|
// to eventually trigger a client redraw
|
||||||
bool wasExpose = fPendingUpdateSession->IsExpose();
|
bool wasExpose = fPendingUpdateSession->IsExpose();
|
||||||
@@ -1897,8 +1912,7 @@ Window::_TriggerContentRedraw(BRegion& dirtyContentRegion)
|
|||||||
// there was suddenly added a dirty region
|
// there was suddenly added a dirty region
|
||||||
// caused by exposing content, we need to clear
|
// caused by exposing content, we need to clear
|
||||||
// the entire background
|
// the entire background
|
||||||
backgroundClearingRegion
|
backgroundClearingRegion = &fPendingUpdateSession->DirtyRegion();
|
||||||
= &(fPendingUpdateSession->DirtyRegion());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fDrawingEngine->LockParallelAccess()) {
|
if (fDrawingEngine->LockParallelAccess()) {
|
||||||
@@ -1924,7 +1938,6 @@ Window::_TriggerContentRedraw(BRegion& dirtyContentRegion)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1971,8 +1984,7 @@ fWindow->ResyncDrawState();
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*! pre: the clipping is readlocked (this function is
|
||||||
pre: the clipping is readlocked (this function is
|
|
||||||
only called from _TriggerContentRedraw()), which
|
only called from _TriggerContentRedraw()), which
|
||||||
in turn is only called from MessageReceived() with
|
in turn is only called from MessageReceived() with
|
||||||
the clipping lock held
|
the clipping lock held
|
||||||
@@ -2001,7 +2013,7 @@ Window::_TransferToUpdateSession(BRegion* contentDirtyRegion)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// _SendUpdateMessage
|
|
||||||
void
|
void
|
||||||
Window::_SendUpdateMessage()
|
Window::_SendUpdateMessage()
|
||||||
{
|
{
|
||||||
@@ -2253,7 +2265,8 @@ Window::_ObeySizeLimits()
|
|||||||
|
|
||||||
|
|
||||||
Window::UpdateSession::UpdateSession()
|
Window::UpdateSession::UpdateSession()
|
||||||
: fDirtyRegion(),
|
:
|
||||||
|
fDirtyRegion(),
|
||||||
fInUse(false),
|
fInUse(false),
|
||||||
fCause(0)
|
fCause(0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user