[PR #10486] wpf: fix the TerminalTheme struct to marshal the same on all platforms #28070

Open
opened 2026-01-31 09:26:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/10486

State: closed
Merged: Yes


The CursorStyle enum is declared as being of type uint on the C# side,
but as size_t on the C++ side. There's a C# size_t impostor we could
use, System.UIntPtr, but I don't want to risk changing the public API of
TerminalTheme and I don't know if it can be used as a base type for an
enum.

Anyway, since we don't have more than four billion cursor types I chose
to narrow the field to a uint32_t and unpack it in TerminalSetTheme.

Fixes #10485

**Original Pull Request:** https://github.com/microsoft/terminal/pull/10486 **State:** closed **Merged:** Yes --- The CursorStyle enum is declared as being of type `uint` on the C# side, but as `size_t` on the C++ side. There's a C# size_t impostor we could use, System.UIntPtr, but I don't want to risk changing the public API of TerminalTheme and I don't know if it can be used as a base type for an enum. Anyway, since we don't have more than four billion cursor types I chose to narrow the field to a uint32_t and unpack it in TerminalSetTheme. Fixes #10485
claunia added the pull-request label 2026-01-31 09:26:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28070