diff options
author | 2019-09-05 21:17:23 +0200 | |
---|---|---|
committer | 2019-09-05 21:17:23 +0200 | |
commit | e6f9b5a16e0b529c4d4cacd6d07e47577403ae39 (patch) | |
tree | 7047ce26e681794bf606683dc9e5ba583569980c /examples | |
parent | 3838203dff120391282c45935ded456ba9d2884d (diff) | |
download | iced-e6f9b5a16e0b529c4d4cacd6d07e47577403ae39.tar.gz iced-e6f9b5a16e0b529c4d4cacd6d07e47577403ae39.tar.bz2 iced-e6f9b5a16e0b529c4d4cacd6d07e47577403ae39.zip |
Set cursor type only when necessary in `tour`
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tour/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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(()) |