When a view has B_DRAW_ON_CHILDREN set, do not ignore the user clipping when
painting the background. The user may have set that on purpose. For regular views, it doesn't really make sense to use the user clipping for painting the background, since there is no way these parts could ever be painted at all. In Draw() there will be a new view state on the stack, so the client has no way to unset the clipping. On the other hand, there may be useful cases where the user applied a clipping, and wants itself not drawing outside of it, but does want the background painted. (For example BTextView::SetTextRect() may use this in the future.) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29790 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6ad5d4edc0
commit
55a88f0c29
@ -1316,8 +1316,17 @@ View::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
|
||||
|
||||
if (fViewBitmap != NULL || fViewColor != B_TRANSPARENT_COLOR) {
|
||||
// we can only draw within our own area
|
||||
BRegion* redraw = fWindow->GetRegion(
|
||||
_ScreenClipping(windowContentClipping));
|
||||
BRegion* redraw;
|
||||
if ((fFlags & B_DRAW_ON_CHILDREN) != 0) {
|
||||
// The client may actually want to prevent the background to
|
||||
// be painted outside the user clipping.
|
||||
redraw = fWindow->GetRegion(
|
||||
ScreenAndUserClipping(windowContentClipping));
|
||||
} else {
|
||||
// Ignore user clipping as in BeOS for painting the background.
|
||||
redraw = fWindow->GetRegion(
|
||||
_ScreenClipping(windowContentClipping));
|
||||
}
|
||||
if (!redraw)
|
||||
return;
|
||||
// add the current clipping
|
||||
|
Loading…
Reference in New Issue
Block a user