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

Resizing window triggers mouse hit #190

Open
kbarros opened this issue Feb 26, 2018 · 1 comment
Open

Resizing window triggers mouse hit #190

kbarros opened this issue Feb 26, 2018 · 1 comment

Comments

@kbarros
Copy link

kbarros commented Feb 26, 2018

If I drag-to-resize the window, it triggers (and holds) a mouse hit event. That is, even after resizing the window, win.input.hit(three::MouseButton::Left) will return true, despite the mouse button no longer being pressed.

Tested on MacOS.

Steps to reproduce:

  • Run cargo run --example mesh-update
  • Drag side of window to resize
  • Move mouse. Camera will rotate, even though mouse button has been released.
@kbarros
Copy link
Author

kbarros commented Feb 26, 2018

This one looks like a glutin issue. When resizing the window, glutin first provides a bunch of Resized events, and then (once the mouse button is released) glutin provides a MouseInput event with state: Pressed.

event WindowEvent { window_id: WindowId(Id(140421723408976)), event: Resized(1654, 1242) }
event WindowEvent { window_id: WindowId(Id(140421723408976)), event: MouseInput { device_id: DeviceId(DeviceId), state: Pressed, button: Left, modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants