Malik Olivier Boussejra 813365e6a8 examples: Add support for changing mouse cursor
If ImGui's mouse_draw_cursor is set to `true`, then ImGui draws the
cursor by itself, so this commits hids the OS cursor.

If ImGui's mouse_draw_cursor is set to `false`, then this commits
updates the OS cursor to the value set by the `set_mouse_cursor`
function provided by the ImGui instance.

For our use case, it seems safe to unwrap the result of the call to
glutin::Window::set_cursor_state, as an error can only potentially when
the `Grab` cursor state is used [1]. In ImGui's use case, the `Grab` state
is never used.

[1] https://docs.rs/crate/winit/0.11.2/source/src/platform/linux/x11/window.rs
2018-03-26 17:11:34 +09:00
..
2017-11-05 21:58:53 +02:00