mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Add cursor hittest window functionality (#2232)
Co-authored-by: z4122 <412213484@qq.com> Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
committed by
GitHub
parent
142d55ff24
commit
bf366cb99d
@@ -482,6 +482,13 @@ impl Window {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_hittest(&self, hittest: bool) -> Result<(), ExternalError> {
|
||||
self.send_request(WindowRequest::PassthroughMouseInput(!hittest));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_ime_position(&self, position: Position) {
|
||||
let scale_factor = self.scale_factor() as f64;
|
||||
|
||||
Reference in New Issue
Block a user