-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when passing Rect pass instead const Rect& #Resolved
vnext/ReactUWP/Utils/RectUtils.cpp
Outdated
float GetBottom(_In_ winrt::Rect rect) { | ||
return (IsEmptyRect(rect) ? NegativeInfinity : rect.Y + rect.Height); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used, remove? #Resolved
vnext/ReactUWP/Utils/RectUtils.cpp
Outdated
} | ||
|
||
REACTWINDOWS_API_(bool) IsEmptyRect(winrt::Rect rect) { | ||
return rect.Width < 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
< [](start = 20, length = 1)
<= ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact consider reusing user32's IsRectEmpty instead
In reply to: 339777475 [](ancestors = 339777475)
vnext/ReactUWP/Utils/RectUtils.cpp
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should set these to 0? #Resolved
vnext/ReactUWP/Utils/RectUtils.cpp
Outdated
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_occlusionsChnaged_revoker [](start = 50, length = 27)
fix typo: Ch n aged #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already RectHelper class I can use, will remove . #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2852
Microsoft Reviewers: Open in CodeFlow