Viewports, Backend: SDL: Fix missing ImGuiBackendFlags_HasSetMousePos flag in docking branch (ok in master), GLFW: Fix application of WantSetMousePos. (#1542, #787)

Shows how little this feature is used with nav (was designed for small devices and frankly may be dropped) - but the backend support itself we will make use of for other features.
This commit is contained in:
ocornut
2021-03-05 16:35:05 +01:00
parent 705f082674
commit d5a4d53000
4 changed files with 4 additions and 3 deletions

View File

@ -218,7 +218,7 @@ static void ImGui_ImplWin32_UpdateMousePos()
if (io.WantSetMousePos)
{
POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
if ((io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) != 0 || ::ClientToScreen(g_hWnd, &pos))
if ((io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) == 0)
::ClientToScreen(g_hWnd, &pos);
::SetCursorPos(pos.x, pos.y);
}