fix: ImGui hover jumps while cursor captured (RMB look / MMB orbit)
With GLFW_CURSOR_DISABLED the official GLFW backend keeps feeding virtual unbounded cursor coords to ImGui each frame, so hover state wanders across hidden panels while the physical cursor is invisible. Append a "mouse left the window" pos event before ImGui::NewFrame whenever the cursor is captured - ImGui treats the frame as mouseless.
This commit is contained in:
@@ -68,6 +68,7 @@ namespace Engine {
|
||||
// 生命周期保证:Application 成员序中 ImGuiLayer 在 Renderer 之后声明
|
||||
//(先析构),因此 Device 引用在整个层生命周期内有效
|
||||
Device& m_Device;
|
||||
Window& m_Window; // 光标捕获状态查询(NewFrame hover 门控)
|
||||
vk::DescriptorPool m_Pool;
|
||||
bool m_Enabled = true;
|
||||
ImTextureID m_SceneTextures[kMaxFramesInFlight]{};
|
||||
|
||||
Reference in New Issue
Block a user