Skip to content

Commit

Permalink
revert to match
Browse files Browse the repository at this point in the history
  • Loading branch information
naomijub committed Jun 22, 2024
1 parent 487699b commit af7ea2f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,14 @@ impl<'w, 's, M: bevy_ecs::event::Event> IcedContext<'w, 's, M> {

let cursor = {
let window = self.windows.single();
window.cursor_position().map_or_else(
|| utils::process_touch_input(self).map_or(Cursor::Unavailable, Cursor::Available),
|position| {
match window.cursor_position() {
Some(position) => {
Cursor::Available(utils::process_cursor_position(position, bounds, window))
},
)
}
None => utils::process_touch_input(self)
.map(Cursor::Available)
.unwrap_or(Cursor::Unavailable),
}
};

let mut messages = Vec::<M>::new();
Expand Down

0 comments on commit af7ea2f

Please sign in to comment.