mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 12:23:46 +03:00
parent
020c0991e4
commit
ce1a05d9bd
@ -116,6 +116,7 @@ impl WindowEventSender {
|
||||
}
|
||||
|
||||
pub fn dispatch(&mut self, event: WindowEvent) {
|
||||
log::trace!("{:?}", event);
|
||||
(self.handler)(event, self.window.as_ref().unwrap());
|
||||
}
|
||||
}
|
||||
|
@ -1090,12 +1090,26 @@ unsafe fn mouse_wheel(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) ->
|
||||
inner.hscroll_remainder += remainder;
|
||||
position += inner.hscroll_remainder / WHEEL_DELTA;
|
||||
inner.hscroll_remainder %= WHEEL_DELTA;
|
||||
log::trace!(
|
||||
"mouse_hwheel delta={} scaled={} remainder={} pos={}",
|
||||
delta,
|
||||
scaled_delta,
|
||||
inner.hscroll_remainder,
|
||||
position
|
||||
);
|
||||
MouseEventKind::HorzWheel(position)
|
||||
} else {
|
||||
let mut inner = inner.borrow_mut();
|
||||
inner.vscroll_remainder += remainder;
|
||||
position += inner.vscroll_remainder / WHEEL_DELTA;
|
||||
inner.vscroll_remainder %= WHEEL_DELTA;
|
||||
log::trace!(
|
||||
"mouse_wheel delta={} scaled={} remainder={} pos={}",
|
||||
delta,
|
||||
scaled_delta,
|
||||
inner.vscroll_remainder,
|
||||
position
|
||||
);
|
||||
MouseEventKind::VertWheel(position)
|
||||
},
|
||||
coords,
|
||||
|
Loading…
Reference in New Issue
Block a user