Avoid superfluous calls to SetDirtyAsBlocks when dragging window

See: #170
This commit is contained in:
Jonathan G Rennison
2020-07-09 20:27:51 +01:00
parent e8843cb979
commit 48b15bb7b8
3 changed files with 7 additions and 2 deletions

View File

@@ -1542,7 +1542,7 @@ void DrawDirtyBlocks()
RedrawScreenRect(0, 0, _screen.width, _screen.height);
Window *w;
FOR_ALL_WINDOWS_FROM_BACK(w) {
w->flags &= ~(WF_DIRTY | WF_WIDGETS_DIRTY);
w->flags &= ~(WF_DIRTY | WF_WIDGETS_DIRTY | WF_DRAG_DIRTIED);
}
_whole_screen_dirty = false;
} else {
@@ -1562,6 +1562,7 @@ void DrawDirtyBlocks()
Window *w;
FOR_ALL_WINDOWS_FROM_BACK(w) {
w->flags &= ~WF_DRAG_DIRTIED;
if (!MayBeShown(w)) continue;
if (w->viewport != nullptr) w->viewport->is_drawn = false;