diff options
-rw-r--r-- | gui/ThemeEngine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 561c0244a2..2abf4a545d 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -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() { |