-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[MacCatalyst] Implement PointerPressed and PointerReleased #16925
Conversation
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.
it looks like some events are firing multiple times
<VerticalStackLayout>
<Label Text="test me">
<Label.GestureRecognizers>
<PointerGestureRecognizer PointerReleased="PointerGestureRecognizer_PointerReleased"
PointerEntered="PointerGestureRecognizer_PointerEntered"
PointerExited="PointerGestureRecognizer_PointerExited"
PointerMoved="PointerGestureRecognizer_PointerMoved"
PointerPressed="PointerGestureRecognizer_PointerPressed"
></PointerGestureRecognizer>
</Label.GestureRecognizers>
</Label>
</VerticalStackLayout>
void PointerGestureRecognizer_PointerReleased(System.Object sender, Microsoft.Maui.Controls.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("PointerGestureRecognizer_PointerReleased");
}
void PointerGestureRecognizer_PointerEntered(System.Object sender, Microsoft.Maui.Controls.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("PointerGestureRecognizer_PointerEntered");
}
void PointerGestureRecognizer_PointerExited(System.Object sender, Microsoft.Maui.Controls.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("PointerGestureRecognizer_PointerExited");
}
void PointerGestureRecognizer_PointerMoved(System.Object sender, Microsoft.Maui.Controls.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("PointerGestureRecognizer_PointerMoved");
}
void PointerGestureRecognizer_PointerPressed(System.Object sender, Microsoft.Maui.Controls.PointerEventArgs e)
{
System.Diagnostics.Debug.WriteLine("PointerGestureRecognizer_PointerPressed");
}
If I press the mouse down and then move it outside the bounds of the label these are the events that I get raised after I release
PointerGestureRecognizer_PointerMoved
PointerGestureRecognizer_PointerMoved
PointerGestureRecognizer_PointerMoved
PointerGestureRecognizer_PointerReleased
PointerGestureRecognizer_PointerEntered
PointerGestureRecognizer_PointerExited
7be11e0
to
e0d7ade
Compare
I would love to test this. The events work great on Windows 👍. |
b1cdd72
to
eb41a25
Compare
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.
Seems like the build is failing by a merge error (duplicated member in GesturePlatformManager)
D:\a\_work\1\s\src\Controls\src\Core\Platform\GestureManager\GesturePlatformManager.Windows.cs(521,8): error CS0111: Type 'GesturePlatformManager' already defines a member called 'OnPgrPointerPressed' with the same parameter types [D:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net7.0-windows10.0.20348]
D:\a\_work\1\s\src\Controls\src\Core\Platform\GestureManager\GesturePlatformManager.Windows.cs(525,8): error CS0111: Type 'GesturePlatformManager' already defines a member called 'OnPgrPointerReleased' with the same parameter types [D:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net7.0-windows10.0.20348]
C:\Users\cloudtest\.nuget\packages\microsoft.windowsappsdk\1.3.230724000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(841,9): error MSB3073: The command ""C:\Users\cloudtest\.nuget\packages\microsoft.windowsappsdk\1.3.230724000\buildTransitive\..\tools\net5.0\..\net472\XamlCompiler.exe" "obj\Release\net7.0-windows10.0.20348\\input.json" "obj\Release\net7.0-windows10.0.20348\\output.json"" exited with code 1. [D:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net7.0-windows10.0.20348]
16 Warning(s)
6 Error(s)
Hi @rachelkang. We have added the "s/pr-needs-author-input" label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time. |
oops, thanks for catching @jsuarezruiz - fixed! |
bc4c794
to
966b263
Compare
@rachelkang Failing tests? |
Hi @rachelkang. We have added the "s/pr-needs-author-input" label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time. |
hopefully this makes the tests all happy! drag and drop appium tests look good now locally on mac |
yay all green now!!! phew |
54b9499
to
c892171
Compare
c892171
to
d395eff
Compare
src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.iOS.cs
Outdated
Show resolved
Hide resolved
8fe4e05
to
0382052
Compare
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.
Have sense to include with this PR changes in the PointerGestureRecognizerEvents sample page and some UI Tests?. I can add it if you want.
Would like to have this for parity pls |
I was first! :) |
I'm wondering why Windows supports PointerPressed & PointerReleased events while macOS doesn't support on 8.0.3 version. Hope this issue could be fixed in the next release. |
/rebase |
769130f
to
73387d1
Compare
Description of Change
Implemented PointerPressed and PointerReleased for MacCatalyst
Issues Fixed
Fixes #13346