fixed the frame buffer version for real
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15134 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -55,6 +55,7 @@ Desktop::~Desktop()
|
||||
void
|
||||
Desktop::Draw(BRect updateRect)
|
||||
{
|
||||
#if RUN_WITH_FRAME_BUFFER
|
||||
// since parts of the view might have been exposed,
|
||||
// we need a clipping rebuild
|
||||
if (LockClipping()) {
|
||||
@@ -64,16 +65,20 @@ Desktop::Draw(BRect updateRect)
|
||||
|
||||
UnlockClipping();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fDrawingEngine->Lock()) {
|
||||
fDrawingEngine->SetHighColor(51, 102, 152);
|
||||
fDrawingEngine->FillRegion(&fBackgroundRegion);
|
||||
fDrawingEngine->Unlock();
|
||||
}
|
||||
|
||||
#if RUN_WITH_FRAME_BUFFER
|
||||
// trigger redrawing windows
|
||||
BRegion update(updateRect);
|
||||
update.Exclude(&fBackgroundRegion);
|
||||
MarkDirty(&update);
|
||||
#endif
|
||||
}
|
||||
|
||||
// MouseDown
|
||||
@@ -108,12 +113,15 @@ Desktop::MouseDown(BPoint where, uint32 buttons)
|
||||
} else {
|
||||
// complete redraw
|
||||
#if RUN_WITH_FRAME_BUFFER
|
||||
// TODO: broken
|
||||
BRegion region(fDrawingEngine->Bounds());
|
||||
MarkDirty(®ion);
|
||||
region = fBackgroundRegion;
|
||||
fBackgroundRegion.MakeEmpty();
|
||||
_SetBackground(®ion);
|
||||
if (fDrawingEngine->Lock()) {
|
||||
BRegion region(fDrawingEngine->Bounds());
|
||||
fDrawingEngine->Unlock();
|
||||
|
||||
MarkDirty(®ion);
|
||||
region = fBackgroundRegion;
|
||||
fBackgroundRegion.MakeEmpty();
|
||||
_SetBackground(®ion);
|
||||
}
|
||||
#else
|
||||
fDrawingEngine->MarkDirty();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user