From 1780c89bafc018f53be407a63e49a314303899c9 Mon Sep 17 00:00:00 2001 From: William Light Date: Sun, 13 Nov 2022 02:22:53 +0100 Subject: [PATCH] macos/view: fix compilation --- src/macos/view.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/macos/view.rs b/src/macos/view.rs index 76014b3..abcef68 100644 --- a/src/macos/view.rs +++ b/src/macos/view.rs @@ -360,5 +360,10 @@ extern "C" fn scroll_wheel(this: &Object, _: Sel, event: id) { } }; - state.trigger_event(Event::Mouse(MouseEvent::WheelScrolled(delta))); + let modifiers = unsafe { NSEvent::modifierFlags(event) }; + + state.trigger_event(Event::Mouse(MouseEvent::WheelScrolled { + delta, + modifiers: make_modifiers(modifiers) + })); }