Repository navigation
Keyboard - #3541
Keyboard#3541
Conversation
| #include <winrt/Windows.UI.Input.h> | ||
| #include <winrt/Windows.UI.Xaml.Controls.h> | ||
| #include <winrt/Windows.UI.Xaml.Input.h> | ||
| #include <winrt/Windows.UI.Xaml.Media.h> |
There was a problem hiding this comment.
Remove. #Resolved
| REACTWINDOWS_API_(bool) IsEmptyRect(winrt::Windows::Foundation::Rect rect); | ||
| REACTWINDOWS_API_(winrt::Windows::Foundation::Rect) CreateEmptyRect(); | ||
| REACTWINDOWS_API_(winrt::Windows::Foundation::Rect) | ||
| UnionRect(winrt::Windows::Foundation::Rect rect1, _In_ winrt::Windows::Foundation::Rect rect2); |
There was a problem hiding this comment.
when passing Rect pass instead const Rect& #Resolved
| float GetBottom(_In_ winrt::Rect rect) { | ||
| return (IsEmptyRect(rect) ? NegativeInfinity : rect.Y + rect.Height); | ||
| } | ||
|
|
There was a problem hiding this comment.
not used, remove? #Resolved
| } | ||
|
|
||
| REACTWINDOWS_API_(bool) IsEmptyRect(winrt::Rect rect) { | ||
| return rect.Width < 0; |
There was a problem hiding this comment.
< [](start = 20, length = 1)
<= ?
There was a problem hiding this comment.
In fact consider reusing user32's IsRectEmpty instead
In reply to: 339777475 [](ancestors = 339777475)
| result.X = std::numeric_limits<float>::infinity(); | ||
| result.Y = std::numeric_limits<float>::infinity(); | ||
| result.Width = -std::numeric_limits<float>::infinity(); | ||
| result.Height = -std::numeric_limits<float>::infinity(); |
There was a problem hiding this comment.
should set these to 0? #Resolved
| // Update this rectangle to be the union of this and rect. | ||
| REACTWINDOWS_API_(winrt::Rect) UnionRect(winrt::Rect rect1, _In_ winrt::Rect rect2) { | ||
| winrt::Rect result = rect1; | ||
| if (IsEmptyRect(rect1)) { |
There was a problem hiding this comment.
can you just call the user32 UnionRect?
UnionRect(ToRECT(rect1), ToRECT(rect2)) #Resolved
| private: | ||
| void SendEvent(std::string &&eventName, folly::dynamic &¶meters); | ||
| std::weak_ptr<IReactInstance> m_wkReactInstance; | ||
| winrt::CoreInputView::OcclusionsChanged_revoker m_occlusionsChnaged_revoker; |
There was a problem hiding this comment.
m_occlusionsChnaged_revoker [](start = 50, length = 27)
fix typo: Ch n aged #Resolved
| REACTWINDOWS_API_(bool) IsEmptyRect(winrt::Windows::Foundation::Rect rect); | ||
| REACTWINDOWS_API_(winrt::Windows::Foundation::Rect) CreateEmptyRect(); | ||
| REACTWINDOWS_API_(winrt::Windows::Foundation::Rect) | ||
| UnionRect(winrt::Windows::Foundation::Rect rect1, _In_ winrt::Windows::Foundation::Rect rect2); |
There was a problem hiding this comment.
There is already RectHelper class I can use, will remove . #Resolved
#2852
Microsoft Reviewers: Open in CodeFlow