Add double-click support on Skia/OS X port (fix #1057)

This commit is contained in:
David Capello 2016-04-12 17:27:01 -03:00
parent 44fadbc275
commit 7c9ba13321

View File

@ -302,7 +302,8 @@ bool is_key_pressed(KeyScancode scancode)
- (void)handleMouseDown:(NSEvent*)event
{
Event ev;
ev.setType(Event::MouseDown);
ev.setType(event.clickCount == 2 ? Event::MouseDoubleClick:
Event::MouseDown);
ev.setPosition(get_local_mouse_pos(self, event));
ev.setButton(get_mouse_buttons(event));
ev.setModifiers(get_modifiers_from_nsevent(event));