Skip to content

Commit

Permalink
only set cursor icon if not none
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Apr 10, 2021
1 parent 2e822b7 commit 79459cb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,8 @@ pub fn process_output(

if let Some(window) = windows.get_primary() {
if let Some(winit_window) = winit_windows.get_window(window.id()) {
match egui_to_winit_cursor_icon(output.cursor_icon) {
None => winit_window.set_cursor_visible(false),
Some(icon) => {
winit_window.set_cursor_visible(true);
winit_window.set_cursor_icon(icon);
}
if let Some(icon) = egui_to_winit_cursor_icon(output.cursor_icon) {
winit_window.set_cursor_icon(icon);
}
} else {
log::error!("No winit window found for the primary window");
Expand Down

0 comments on commit 79459cb

Please sign in to comment.