Skip to content

Commit

Permalink
Set cursor hittest during window creation (#7966)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Mar 9, 2023
1 parent 3cfcc66 commit 84711e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 84711e3

Please sign in to comment.