Yes it's a minor problem, but in window mode, it was not easy to resize the main window anymore. Not clean.
But I just found a workaround. For those who may need it, it consists in switching the ImGuiConfigFlags_NoMouseCursorChange flag when ImGui really needs it.
Here is the code (it's a raw copy of my code, just to understand the principle, you'll have to adapt to your own code). It must be set between the events polling and the ImGUI update.
static ImGuiIO& ioImgui = ImGui::GetIO();
static bool imguiHasCursorPrev = true;
bool imguiHasCursor = ioImgui.WantCaptureMouse || ioImgui.WantCaptureKeyboard;
if (imguiHasCursor != imguiHasCursorPrev)
{
if (imguiHasCursor)
{
ioImgui.ConfigFlags &= !ImGuiConfigFlags_NoMouseCursorChange;
}
else
{
ioImgui.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;
window.setMouseCursor(cursorDefault);
}
imguiHasCursorPrev = imguiHasCursor;
}
note : "window" is my main sfml window.
and cursorDefault.loadFromSystem(sf::Cursor::Arrow);