Skip to content

draw/plan9: correct Msec type, White/Black fields, add Cursor2 fallback - #134

Open
mushkevych wants to merge 6 commits into
9fans:mainfrom
mushkevych:tcell-fixes
Open

mushkevych wants to merge 6 commits into
9fans:mainfrom
mushkevych:tcell-fixes

Conversation

@mushkevych

Copy link
Copy Markdown

This PR corrects issues in the Plan 9 draw package that affects consumer of its mouse and cursor functionality:

  • Mouse timestamp type – Mouse.Msec is defined as uint32 but was assigned from an int. Fixed by casting to uint32.

  • Cursor buffer packing – Updated to use the canonical White/Black fields instead of the obsolete Clr/Set, ensuring correct buffer sizing and rendering.

  • Cursor2 fallback – Added a safe fallback to Cursor on systems without hi-DPI support, so callers using Cursor2 degrade gracefully.

@fhs

fhs commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #141

@mushkevych

Copy link
Copy Markdown
Author

@0intro @fhs — just following up on this PR.

It addresses the Plan 9 build failures reported in #141 and provides a fallback for Cursor2() using the existing legacy cursor implementation.

I noticed that #140 and the more recent #147 also address the same issue.

Could you please advise which approach you'd prefer to move forward with, and whether any changes or additional tests are needed to get this merged?

Happy to make any necessary adjustments. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants