Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@
<CETCompat>false</CETCompat>
</Link>
</ItemDefinitionGroup>

<!-- Suppress LNK4279 for ARM64EC: the new MSVC toolset (14.51+) classifies POINT as an
integer (i8) icall thunk while pre-built MFC libs use a struct (m8) thunk.
Both thunks produce equivalent code for this trivially-copyable 8-byte struct,
so the mismatch is a diagnostic false-positive introduced by the ABI transition. -->
<ItemDefinitionGroup Condition="'$(Platform)' == 'ARM64EC'">
<Link>
<AdditionalOptions>/IGNORE:4279 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
</Project>
11 changes: 8 additions & 3 deletions UI/Dialogs/Dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,14 @@ namespace dialog
rcCloseIcon.top,
rcCloseIcon.right,
rcCloseIcon.bottom);
if (PtInRect(&rcCloseIcon, pt)) ret = HTCLOSE;
if (PtInRect(&rcMaxIcon, pt)) ret = HTMAXBUTTON;
if (PtInRect(&rcMinIcon, pt)) ret = HTMINBUTTON;
// Inline point-in-rect check to avoid ARM64EC icall thunk mismatch (LNK4279)
// between our code and the pre-built MFC library for PtInRect(RECT*, POINT).
const auto ptInRect = [](const RECT& rc, POINT p) noexcept {
return p.x >= rc.left && p.x < rc.right && p.y >= rc.top && p.y < rc.bottom;
};
if (ptInRect(rcCloseIcon, pt)) ret = HTCLOSE;
if (ptInRect(rcMaxIcon, pt)) ret = HTMAXBUTTON;
if (ptInRect(rcMinIcon, pt)) ret = HTMINBUTTON;

output::DebugPrint(output::dbgLevel::UI, L"CheckButtons result: %ws\r\n", FormatHT(ret).c_str());

Expand Down
Loading