Set cursor hittest during window creation (#7966)

This commit is contained in:
张林伟 2023-03-09 13:39:49 +08:00 committed by GitHub
parent 3cfcc66bdc
commit 84711e38b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,6 +166,12 @@ impl WinitWindows {
}
winit_window.set_cursor_visible(window.cursor.visible);
if let Err(err) = winit_window.set_cursor_hittest(window.cursor.hit_test) {
warn!(
"Could not set cursor hit test for window {:?}: {:?}",
window.title, err
);
}
self.entity_to_winit.insert(entity, winit_window.id());
self.winit_to_entity.insert(winit_window.id(), entity);