@@ -4190,7 +4190,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
41904190 DragDropMouseButton = -1;
41914191 DragDropTargetId = 0;
41924192 DragDropTargetFullViewport = 0;
4193- DragDropAcceptFlags = ImGuiDragDropFlags_None;
4193+ DragDropAcceptFlagsCurr = DragDropAcceptFlagsPrev = ImGuiDragDropFlags_None;
41944194 DragDropAcceptIdCurrRectSurface = 0.0f;
41954195 DragDropAcceptIdPrev = DragDropAcceptIdCurr = 0;
41964196 DragDropAcceptFrameCount = -1;
@@ -5528,6 +5528,8 @@ void ImGui::NewFrame()
55285528 // Drag and drop
55295529 g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr;
55305530 g.DragDropAcceptIdCurr = 0;
5531+ g.DragDropAcceptFlagsPrev = g.DragDropAcceptFlagsCurr;
5532+ g.DragDropAcceptFlagsCurr = ImGuiDragDropFlags_None;
55315533 g.DragDropAcceptIdCurrRectSurface = FLT_MAX;
55325534 g.DragDropWithinSource = false;
55335535 g.DragDropWithinTarget = false;
@@ -14552,7 +14554,7 @@ void ImGui::ClearDragDrop()
1455214554 IMGUI_DEBUG_LOG_ACTIVEID("[dragdrop] ClearDragDrop()\n");
1455314555 g.DragDropActive = false;
1455414556 g.DragDropPayload.Clear();
14555- g.DragDropAcceptFlags = ImGuiDragDropFlags_None;
14557+ g.DragDropAcceptFlagsCurr = ImGuiDragDropFlags_None;
1455614558 g.DragDropAcceptIdCurr = g.DragDropAcceptIdPrev = 0;
1455714559 g.DragDropAcceptIdCurrRectSurface = FLT_MAX;
1455814560 g.DragDropAcceptFrameCount = -1;
@@ -14681,7 +14683,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
1468114683 // Target can request the Source to not display its tooltip (we use a dedicated flag to make this request explicit)
1468214684 // We unfortunately can't just modify the source flags and skip the call to BeginTooltip, as caller may be emitting contents.
1468314685 bool ret;
14684- if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlags & ImGuiDragDropFlags_AcceptNoPreviewTooltip))
14686+ if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlagsPrev & ImGuiDragDropFlags_AcceptNoPreviewTooltip))
1468514687 ret = BeginTooltipHidden();
1468614688 else
1468714689 ret = BeginTooltip();
@@ -14862,7 +14864,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop
1486214864 if (r_surface > g.DragDropAcceptIdCurrRectSurface)
1486314865 return NULL;
1486414866
14865- g.DragDropAcceptFlags = flags;
14867+ g.DragDropAcceptFlagsCurr = flags;
1486614868 g.DragDropAcceptIdCurr = g.DragDropTargetId;
1486714869 g.DragDropAcceptIdCurrRectSurface = r_surface;
1486814870 //IMGUI_DEBUG_LOG("AcceptDragDropPayload(): %08X: accept\n", g.DragDropTargetId);
0 commit comments