mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-12 14:08:37 +00:00
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