mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-29 04:35:49 +03: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:
parent
98d52b7b26
commit
c4bc674482
3 changed files with 12 additions and 5 deletions
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue