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

@@ -2244,7 +2244,10 @@ static EventState HandleWindowDragging()
break;
}
w->SetDirtyAsBlocks();
if (!(w->flags & WF_DRAG_DIRTIED)) {
w->flags |= WF_DRAG_DIRTIED;
w->SetDirtyAsBlocks();
}
int x = _cursor.pos.x + _drag_delta.x;
int y = _cursor.pos.y + _drag_delta.y;