Merge pull request #291 from mitchmindtree/master

Fix MouseMoved by checking for NSDrag events as well, closes #288
This commit is contained in:
tomaka 2015-02-22 08:40:22 +01:00
commit d6ecbe6bfe

View file

@ -237,7 +237,10 @@ impl<'a> Iterator for PollEventsIterator<'a> {
NSLeftMouseUp => { Some(MouseInput(Released, MouseButton::Left)) }, NSLeftMouseUp => { Some(MouseInput(Released, MouseButton::Left)) },
NSRightMouseDown => { Some(MouseInput(Pressed, MouseButton::Right)) }, NSRightMouseDown => { Some(MouseInput(Pressed, MouseButton::Right)) },
NSRightMouseUp => { Some(MouseInput(Released, MouseButton::Right)) }, NSRightMouseUp => { Some(MouseInput(Released, MouseButton::Right)) },
NSMouseMoved => { NSMouseMoved |
NSLeftMouseDragged |
NSOtherMouseDragged |
NSRightMouseDragged => {
let window_point = event.locationInWindow(); let window_point = event.locationInWindow();
let window: id = msg_send()(event, selector("window")); let window: id = msg_send()(event, selector("window"));
let view_point = if window == 0 { let view_point = if window == 0 {