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

Not detecting mouse release after alt-tab on windows #4418

Closed
nickd-airo opened this issue Apr 26, 2024 · 0 comments · Fixed by #4419
Closed

Not detecting mouse release after alt-tab on windows #4418

nickd-airo opened this issue Apr 26, 2024 · 0 comments · Fixed by #4419
Labels
bug Something is broken

Comments

@nickd-airo
Copy link

Environment

App: egui_demo_app (+ other egui-based apps)
OS: Windows 11
Git: 0bc59f5

Describe the bug

  1. Open the 'input test' demo.
  2. Click and hold Sense::drag
  3. Move cursor off egui window
  4. Alt-tab to a different window
  5. Release mouse
  6. Alt-tab back to egui window
  7. Move cursor around
  8. Mouse is erroneously considered pressed, even though it was released
  9. Click mouse on egui window to fix state

Expected

Mouse should be detected as released once it is released. Other native windows apps seem to do this correctly, e.g. ms paint.

@nickd-airo nickd-airo added the bug Something is broken label Apr 26, 2024
emilk pushed a commit that referenced this issue May 11, 2024
* Closes #4406
* Closes #4418 

If `Event::PointerGone` occurs, it is treated as
`PointerEvent::Released`.
emilk added a commit that referenced this issue May 22, 2024
* Closes #3157

If the mouse leaves the canvas when dragging a slider, the slider will
still move.

---

To support this, I had to revert #4419
Despite that, I fail to reproduce the two issues it claimed to solve:

* #4406 may have been solved in
another way by this PR
* #4418 I cannot reproduce on Mac.
If it is still a problem, I think it should be solved by triggering a
`PointerEvent::Released` when focus is lost (i.e. on alt-tab), and not
on `PointerGone`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant