Skip to content

Commit d33e18e

Browse files
thorn132hecrj
authored andcommitted
Fix integration example
1 parent 3a6f29c commit d33e18e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

examples/integration/src/main.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,17 @@ pub fn main() -> Result<(), winit::error::EventLoopError> {
286286
..
287287
} = state
288288
{
289-
window.set_cursor(
290-
conversion::mouse_interaction(
289+
// Update the mouse cursor
290+
if let Some(icon) =
291+
iced_winit::conversion::mouse_interaction(
291292
mouse_interaction,
292-
),
293-
);
293+
)
294+
{
295+
window.set_cursor(icon);
296+
window.set_cursor_visible(true);
297+
} else {
298+
window.set_cursor_visible(false);
299+
}
294300
}
295301

296302
// Draw the interface

0 commit comments

Comments
 (0)