From 246837adc8b8f531d5a7481b0fcb2687a3a27711 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 22 Feb 2015 15:15:50 +1100 Subject: Fix MouseMoved by checking for NSDrag events as well, closes #288 --- src/cocoa/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cocoa/mod.rs b/src/cocoa/mod.rs index 12f7a06..877a876 100644 --- a/src/cocoa/mod.rs +++ b/src/cocoa/mod.rs @@ -237,7 +237,10 @@ impl<'a> Iterator for PollEventsIterator<'a> { NSLeftMouseUp => { Some(MouseInput(Released, MouseButton::Left)) }, NSRightMouseDown => { Some(MouseInput(Pressed, MouseButton::Right)) }, NSRightMouseUp => { Some(MouseInput(Released, MouseButton::Right)) }, - NSMouseMoved => { + NSMouseMoved | + NSLeftMouseDragged | + NSOtherMouseDragged | + NSRightMouseDragged => { let window_point = event.locationInWindow(); let window: id = msg_send()(event, selector("window")); let view_point = if window == 0 { -- cgit v1.2.3