mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Viewport: Removed the need for the back-end to fill io.MousePosViewport, it seems unnecessary at this point. (#1542)
This commit is contained in:
@ -207,7 +207,6 @@ static void ImGui_ImplGlfw_UpdateMousePosAndButtons()
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
const ImVec2 mouse_pos_backup = io.MousePos;
|
||||
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
|
||||
io.MousePosViewport = 0;
|
||||
io.MouseHoveredViewport = 0;
|
||||
|
||||
// Update buttons
|
||||
@ -236,7 +235,6 @@ static void ImGui_ImplGlfw_UpdateMousePosAndButtons()
|
||||
glfwGetCursorPos(window, &mouse_x, &mouse_y);
|
||||
io.MousePos = ImVec2((float)mouse_x + viewport->Pos.x, (float)mouse_y + viewport->Pos.y);
|
||||
}
|
||||
io.MousePosViewport = viewport->ID;
|
||||
for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++)
|
||||
io.MouseDown[i] |= glfwGetMouseButton(window, i) != 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user