Web: use raw data in DeviceEvent::MouseMotion (#3803)

Only supported on Chrome MacOS and Windows.
This commit is contained in:
daxpedda 2024-07-23 17:05:55 +02:00 committed by GitHub
parent ef580b817d
commit 2e97ab3d4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 190 additions and 29 deletions

View file

@ -8,7 +8,7 @@ use std::rc::Rc;
use web_sys::Element;
use super::super::monitor::MonitorHandle;
use super::super::KeyEventExtra;
use super::super::{lock, KeyEventExtra};
use super::device::DeviceId;
use super::runner::{EventWrapper, WeakShared};
use super::window::WindowId;
@ -652,6 +652,10 @@ impl ActiveEventLoop {
self.runner.wait_until_strategy()
}
pub(crate) fn is_cursor_lock_raw(&self) -> bool {
lock::is_cursor_lock_raw(self.runner.window(), self.runner.document())
}
pub(crate) fn waker(&self) -> Waker<WeakShared> {
self.runner.waker()
}