diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2016-03-02 16:13:13 -0800 |
---|---|---|
committer | Jack Moffitt <jack@metajack.im> | 2016-03-03 16:49:35 -0700 |
commit | 7886ff9acdbc4961359725536c1a15e2cbb3d4f5 (patch) | |
tree | 1243ddf9e5b337b0b8ad91eabc269ce429072a4b /src/api/win32 | |
parent | 2638db665afc175cf128c3e25bc883f4c114bb5a (diff) | |
download | glutin-7886ff9acdbc4961359725536c1a15e2cbb3d4f5.tar.gz glutin-7886ff9acdbc4961359725536c1a15e2cbb3d4f5.zip |
Add phases to wheel events.
Needed for apps to support overscroll on the Mac.
Diffstat (limited to 'src/api/win32')
-rw-r--r-- | src/api/win32/callback.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/win32/callback.rs b/src/api/win32/callback.rs index 0215c9f..2d10699 100644 --- a/src/api/win32/callback.rs +++ b/src/api/win32/callback.rs @@ -134,12 +134,13 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT, winapi::WM_MOUSEWHEEL => { use events::Event::MouseWheel; use events::MouseScrollDelta::LineDelta; + use events::TouchPhase; let value = (wparam >> 16) as i16; let value = value as i32; let value = value as f32 / winapi::WHEEL_DELTA as f32; - send_event(window, MouseWheel(LineDelta(0.0, value))); + send_event(window, MouseWheel(LineDelta(0.0, value), TouchPhase::Moved)); 0 }, |