Skip to content

Commit

Permalink
it's definitely safe now
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Aug 14, 2024
1 parent 0407a64 commit 7e26412
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/interactivity/win32/uiaTextRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ IFACEMETHODIMP UiaTextRange::Clone(_Outptr_result_maybenull_ ITextRangeProvider*

void UiaTextRange::_TranslatePointToScreen(til::point& clientPoint) const
{
ClientToScreen(_getWindowHandle(), clientPoint.as_win32_point());
auto win32Point = clientPoint.as_win32_point();
ClientToScreen(_getWindowHandle(), win32Point);
clientPoint = til::point{ *win32Point };
}

void UiaTextRange::_TranslatePointFromScreen(til::point& screenPoint) const
{
ScreenToClient(_getWindowHandle(), screenPoint.as_win32_point());
auto win32Point = screenPoint.as_win32_point();
ScreenToClient(_getWindowHandle(), win32Point);
screenPoint = til::point{ *win32Point };
}

HWND UiaTextRange::_getWindowHandle() const
Expand Down

0 comments on commit 7e26412

Please sign in to comment.