Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Added multi windows check for bevy_ui Interaction. #5225

Closed
wants to merge 7 commits into from
5 changes: 3 additions & 2 deletions crates/bevy_ui/src/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ pub fn ui_focus_system(
mouse_button_input.just_pressed(MouseButton::Left) || touches_input.any_just_pressed();

let cursor_position = windows
.get_primary()
.and_then(|window| window.cursor_position())
.iter()
.filter_map(|window| window.cursor_position())
.next()
farend-east marked this conversation as resolved.
Show resolved Hide resolved
.or_else(|| touches_input.first_pressed_position());

let mut moused_over_z_sorted_nodes = node_query
Expand Down