GUI: Clear dirty rects when initializing ThemeEngine.

This avoids nasty invalid writes to the overlay when the overlay is being
resized.
This commit is contained in:
Johannes Schickel 2013-08-18 20:12:12 +02:00
parent d58efe3818
commit 74a056e746

View File

@ -521,6 +521,12 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) {
delete _vectorRenderer;
_vectorRenderer = Graphics::createRenderer(mode);
_vectorRenderer->setSurface(&_screen);
// Since we reinitialized our screen surfaces we know nothing has been
// drawn so far. Sometimes we still end up with dirty screen bits in the
// list. Clearing it avoids invalid overlay writes when the backend
// resizes the overlay.
_dirtyScreen.clear();
}
void WidgetDrawData::calcBackgroundOffset() {