Repository navigation
fix: Fix pointer and keyboard events not raised on CoreWindow - #20506
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR ensures pointer and keyboard events are raised on CoreWindow by removing the ContentRootType guard and always registering the input sources.
- Always call
SetPointerInputSourceonCoreWindowregardless of content root type. - Always call
SetKeyboardInputSourceonCoreWindowregardless of content root type.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs | Removed ContentRootType check to always invoke SetPointerInputSource |
| src/Uno.UI/UI/Xaml/Internal/InputManager.Keyboard.skia.cs | Removed ContentRootType check to always invoke SetKeyboardInputSource |
Comments suppressed due to low confidence (2)
src/Uno.UI/UI/Xaml/Internal/InputManager.Pointers.Managed.cs:83
- Add a comment explaining why the
ContentRootTypecheck was removed to clarify the intent and aid future maintainers.
CoreWindow.GetForCurrentThreadSafe()?.SetPointerInputSource(_source);
src/Uno.UI/UI/Xaml/Internal/InputManager.Keyboard.skia.cs:45
- Add unit or UI tests to verify that keyboard events are properly routed through
CoreWindownow that the guard is removed.
CoreWindow.GetForCurrentThreadSafe()?.SetKeyboardInputSource(_source);
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20506/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20506/wasm-skia-net9/index.html |
|
The build 166492 found UI Test snapshots differences: Details
|
|
Can you back port this into Uno6.0? |
|
@HakanL not sure yet, waiting for QA to test it. Anyway 6.1 is already around the corner :) |
I always struggle to figure out which dev build the merged PRs in Uno are in, can you tell me which one it's in so I can test this? Would it be in the latest dev-167? |
|
@Mergifyio backport release/stable/6.0 |
✅ Backports have been createdDetails
|
…6.0/pr-20506 fix: Fix pointer and keyboard events not raised on CoreWindow (backport #20506)
…owEvents fix: Fix pointer and keyboard events not raised on CoreWindow
closes #20350
Bugfix
Fix pointer and keyboard events not raised on CoreWindow
What is the current behavior?
Pointer and keyboard input source are not set on the
CoreWindowon desktop target as it reports as "Xaml Island"(as expected, cf. #20491)What is the new behavior?
We ignore the content root type and set the sources as long as we have a
CoreWindowinstance.PR Checklist
Screenshots Compare Test Runresults.