microsoft / microsoft/microsoft-ui-xaml
SDK v1.8.0: Hovering on modal window triggers pointer events of the owner window's button
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
I have a button to open a modal window with `OverlappedPresenter` using `AppWindow`, the mouse pointer of the button is still captured, and its events (`PointerEntered` and `PointerExited`) are **constantly** triggered when the modal window is opened.
### Why is this important?
- `PointerEntered` and `PointerExited` event of the button are triggered constantly
- Clicking the buttons from the modal window is sometimes not triggered (because the mouse pointer is still captured by the original button)
### Steps to reproduce the bug
This can reproduce with WinUI 3 Gallery
1. Open WinUI 3 Gallery, go to Windowing > AppWindow
2. Click the "Show modal window" button
3. Move cursor to the modal window
4. The "Show modal window" button is flashing (it's a bit hard to see because of the button background)
5. The issue stops only if you move your cursor out of the owner window, or make it lost focus
### Actual behavior
The "Show modal window" button is flashing (it's a bit hard to see because of the button background)
### Expected behavior
- The "Show modal window" button is not flashing
- The "Show modal window" button does not trigger `PointerEntered` and `PointerExited` event
### Screenshots
Please look closely to the background of the "Show modal window" button, it's a bit hard to see because of the button background.
https://github.com/user-attachments/assets/ea381fae-0efa-484e-bcdd-15474e3206c9
### NuGet package version
WinUI 3 - Windows App SDK 1.8.1
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
The issue can be reproduced with WinUI 3 Gallery v2.7.0, see the video here: https://github.com/microsoft/microsoft-ui-xaml/issues/10758#issuecomment-3337804285
Contributor guide
Research direction
Reproduce this in WinUI 3 Gallery v2.7.0 through Windowing > AppWindow, using the "Show modal window" button and moving the pointer over the modal window. Investigate the owner button's pointer behavior during the modal interaction; done when the button no longer flashes or receives PointerEntered and PointerExited events while the modal window is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100