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

Discard mouse down after Cocoa window resize #466

Merged
merged 2 commits into from
Apr 15, 2018
Merged

Discard mouse down after Cocoa window resize #466

merged 2 commits into from
Apr 15, 2018

Conversation

swiftcoder
Copy link
Contributor

We are sending the mouse down event after the window resize has
completed, because Cocoa uses a modal event loop to implement window
resize. This leads to a mouse down without a matching mouse up.

This fixes #463.

We are sending the mouse down event after the window resize has
completed, because Cocoa uses a modal event loop to implement window
resize. This leads to a mouse down without a matching mouse up.
@francesca64
Copy link
Member

Very nice. I've also confirmed that it fixes the referenced Alacritty problem.

It would be nice to have a comment or two added explaining what the discarding is for, though. In addition to that, a CHANGELOG entry can't hurt.

Add some explanatory comments and a changelog entry.
@francesca64
Copy link
Member

Thanks!

@francesca64 francesca64 merged commit 19cd531 into rust-windowing:master Apr 15, 2018
francesca64 added a commit that referenced this pull request Apr 18, 2018
francesca64 added a commit that referenced this pull request Apr 18, 2018
This reverts commit 19cd531.

Testing fullscreen functionality revealed that windowDidResize is invoked in more cases than previously thought, causing the user's events to be eaten and HiDPI problems.
tmfink pushed a commit to tmfink/winit that referenced this pull request Jan 5, 2022
Update canvas_nanovg example

The `canvas_nanovg` example would not run on my Linux machine due to the bug in `winit` 0.19 (rust-windowing#1773)

In this PR, I updated `winit` and `surfman` and made the minimum necessary changes so that the example would compile and run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

macOS: winit emits a MouseInput event after resizing
2 participants