Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtlasEngine: Fix cursor invalidation #14038

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/renderer/atlas/AtlasEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ try
_r.dirtyRect = _api.dirtyRect;
_r.scrollOffset = _api.scrollOffset;

// Clear the previous cursor. PaintCursor() is only called if the cursor is on.
if (const auto r = _api.invalidatedCursorArea; r.non_empty())
{
_setCellFlags(r, CellFlags::Cursor, CellFlags::None);
_r.dirtyRect |= til::rect{ r.left, r.top, r.right, r.bottom };
}

// This is an important block of code for our TileHashMap.
// We only process glyphs within the dirtyRect, but glyphs outside of the
// dirtyRect are still in use and shouldn't be discarded. This is critical
Expand Down Expand Up @@ -437,13 +444,6 @@ try
}
}

// Clear the previous cursor
if (const auto r = _api.invalidatedCursorArea; r.non_empty())
{
_setCellFlags(r, CellFlags::Cursor, CellFlags::None);
_r.dirtyRect |= til::rect{ r.left, r.top, r.right, r.bottom };
}

if (options.isOn)
{
const auto point = options.coordCursor;
Expand Down