fix mouse wheel scroll up not work when controlling mac hidpi (#7848)

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2024-04-27 17:31:35 +08:00 committed by GitHub
parent ade458b820
commit e9d9a656ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3615,6 +3615,11 @@ impl Retina {
#[inline]
fn on_mouse_event(&mut self, e: &mut MouseEvent, current: usize) {
let evt_type = e.mask & 0x7;
if evt_type == crate::input::MOUSE_TYPE_WHEEL {
// x and y are always 0, +1 or -1
return;
}
let Some(d) = self.displays.get(current) else {
return;
};