hrev48023 adds 1 changeset to branch 'master' old head: 1431a56f3371270f08d20ca2e46a28418ac7ecd9 new head: 77342b3ad85c1b3d9d96aa0ff7f66e6a941fb735 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=77342b3+%5E1431a56 ---------------------------------------------------------------------------- 77342b3: Chart: clear view when switiching to BDirectWindow Even when BDirectWindow is used, the back buffer data can be copied to the front buffer. This happens when resizing or moving the window, and when moving the cursor above it. Since Charts does not touch the whole window when redrawing (it only erases previous stars and draws new ones) this led to the last frame drawn on the back buffer to stay visible until stars erased it. Clearing the back buffer view with the current "sapce color" makes this much less visible. Fixes #96. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev48023 Commit: 77342b3ad85c1b3d9d96aa0ff7f66e6a941fb735 URL: http://cgit.haiku-os.org/haiku/commit/?id=77342b3 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Oct 15 07:22:41 2014 UTC Ticket: https://dev.haiku-os.org/ticket/96 ---------------------------------------------------------------------------- 1 file changed, 7 insertions(+) src/tests/kits/game/chart/ChartWindow.cpp | 7 +++++++ ---------------------------------------------------------------------------- diff --git a/src/tests/kits/game/chart/ChartWindow.cpp b/src/tests/kits/game/chart/ChartWindow.cpp index c75dc60..bd08da2 100644 --- a/src/tests/kits/game/chart/ChartWindow.cpp +++ b/src/tests/kits/game/chart/ChartWindow.cpp @@ -1504,6 +1504,13 @@ ChartWindow::ChangeSetting(setting new_set) /* this need to be atomic in regard of DirectConnected */ while (acquire_sem(fDrawingLock) == B_INTERRUPTED) ; + + // Clear the non-direct view, which may still be drawn + fChartView->LockLooper(); + fChartView->SetHighColor(fCurrentSettings.back_color); + fChartView->FillRect(fChartView->Bounds()); + fChartView->UnlockLooper(); + /* synchronise the camera geometry and the direct buffer geometry */ SetGeometry(fDirectBuffer.buffer_width, fDirectBuffer.buffer_height); /* cancel erasing of stars not in visible part of the direct window */