From e6f9b5a16e0b529c4d4cacd6d07e47577403ae39 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 5 Sep 2019 21:17:23 +0200 Subject: Set cursor type only when necessary in `tour` --- examples/tour/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/tour/main.rs b/examples/tour/main.rs index 1a9ba362..571bc2e2 100644 --- a/examples/tour/main.rs +++ b/examples/tour/main.rs @@ -170,7 +170,11 @@ impl event::EventHandler for Game { self.tour.update(message); } - mouse::set_cursor_type(context, into_cursor_type(cursor)); + let cursor_type = into_cursor_type(cursor); + + if mouse::cursor_type(context) != cursor_type { + mouse::set_cursor_type(context, cursor_type); + } graphics::present(context)?; Ok(()) -- cgit