mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-22 04:40:41 +00:00
IO: WantCaptureKeyboard is never set when ImGuiConfigFlags_NoKeyboard is enabled. (#4921)
+ Retroactively add missing changelog item in 1.90 + Backends: Vulkan: use GetTexID() for consistency.
This commit is contained in:
11
imgui.cpp
11
imgui.cpp
@@ -4998,9 +4998,14 @@ void ImGui::UpdateHoveredWindowAndCaptureFlags()
|
||||
}
|
||||
|
||||
// Update io.WantCaptureKeyboard for the user application (true = dispatch keyboard info to Dear ImGui only, false = dispatch keyboard info to Dear ImGui + underlying app)
|
||||
io.WantCaptureKeyboard = (g.ActiveId != 0) || (modal_window != NULL);
|
||||
if (io.NavActive && (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) && !(io.ConfigFlags & ImGuiConfigFlags_NavNoCaptureKeyboard))
|
||||
io.WantCaptureKeyboard = true;
|
||||
io.WantCaptureKeyboard = false;
|
||||
if ((io.ConfigFlags & ImGuiConfigFlags_NoKeyboard) == 0)
|
||||
{
|
||||
if ((g.ActiveId != 0) || (modal_window != NULL))
|
||||
io.WantCaptureKeyboard = true;
|
||||
else if (io.NavActive && (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) && !(io.ConfigFlags & ImGuiConfigFlags_NavNoCaptureKeyboard))
|
||||
io.WantCaptureKeyboard = true;
|
||||
}
|
||||
if (g.WantCaptureKeyboardNextFrame != -1) // Manual override
|
||||
io.WantCaptureKeyboard = (g.WantCaptureKeyboardNextFrame != 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user