1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Drag and Drop: handling of Escape after UpdateKeyboardInputs(). (#9071)

This commit is contained in:
ocornut 2025-11-19 17:21:17 +01:00
parent 1f16ca5e5c
commit db6b8e0fb3

View file

@ -5525,6 +5525,18 @@ void ImGui::NewFrame()
g.HoverItemDelayTimer = g.HoverItemDelayClearTimer = 0.0f; // May want a decaying timer, in which case need to clamp at max first, based on max of caller last requested timer.
}
// Close popups on focus lost (currently wip/opt-in)
//if (g.IO.AppFocusLost)
// ClosePopupsExceptModals();
// Update keyboard input state
UpdateKeyboardInputs();
//IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl));
//IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift));
//IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt));
//IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper));
// Drag and drop
g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr;
g.DragDropAcceptIdCurr = 0;
@ -5541,18 +5553,6 @@ void ImGui::NewFrame()
}
g.TooltipPreviousWindow = NULL;
// Close popups on focus lost (currently wip/opt-in)
//if (g.IO.AppFocusLost)
// ClosePopupsExceptModals();
// Update keyboard input state
UpdateKeyboardInputs();
//IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl));
//IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift));
//IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt));
//IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper));
// Update keyboard/gamepad navigation
NavUpdate();