Skip to content
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

InputNonClientPointerSource.PointerReleased event is not invoked when the pointer is moved away while a button is pressed #9659

Open
lhak opened this issue May 16, 2024 · 1 comment
Labels
area-Windowing team-CompInput Issue for IXP (Composition, Input) team

Comments

@lhak
Copy link

lhak commented May 16, 2024

Describe the bug

To implement custom drawn window buttons, pointer events need to be handled to draw the buttons correctly. The InputNonClientPointerSource.PointerPressed event can be used to detect when a mouse button is pressed in the non client area (e.g. on a window button). However, when the pointer is moved out of the non client area while the button is pressed, the InputNonClientPointerSource.PointerReleased event is not invoked when the button is finally released. It is invoked once the pointer is moved back. This makes implementing the different window button states correctly basically impossible.

Steps to reproduce the bug

  1. Register for InputNonClientPointerSource.PointerReleased event
  2. Press the mouse button while the pointer is in a non client area and then mvoe it out while keeping the button pressed
  3. Release the button -> Observe that the event is not invoked
  4. Move the pointer back to the non client area -> The event is now invoked

Expected behavior

There should be away to track button releases even when the pointer is moved out of the non client area.

Screenshots

No response

NuGet package version

Windows App SDK 1.5.3: 1.5.240428000

Packaging type

Unpackaged

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

No response

Additional context

No response

@codendone codendone transferred this issue from microsoft/WindowsAppSDK May 23, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label May 23, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@codendone codendone added team-CompInput Issue for IXP (Composition, Input) team area-Windowing and removed needs-triage Issue needs to be triaged by the area owners labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windowing team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

2 participants