mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-08 04:40:09 +00:00
Drag and Drop: Disable tracking mouse button ownership when an external drag source is active, to make it easier to achieve drag and drop over multiple OS windows. (#143)
This commit is contained in:
parent
8d21ee56d2
commit
e1a103b251
2 changed files with 7 additions and 3 deletions
|
|
@ -2456,8 +2456,9 @@ void ImGui::NewFrame()
|
|||
g.OsImePosRequest = ImVec2(1.0f, 1.0f); // OS Input Method Editor showing on top-left of our window by default
|
||||
|
||||
// If mouse was first clicked outside of ImGui bounds we also cancel out hovering.
|
||||
// FIXME: For patterns of drag and drop between "application" and "imgui" we may need to rework/remove this test (first committed 311c0ca9 on 2015/02)
|
||||
if (!mouse_avail_to_imgui)
|
||||
// FIXME: For patterns of drag and drop across OS windows, we may need to rework/remove this test (first committed 311c0ca9 on 2015/02)
|
||||
bool mouse_dragging_extern_payload = g.DragDropActive && (g.DragDropSourceFlags & ImGuiDragDropFlags_SourceExtern) != 0;
|
||||
if (!mouse_avail_to_imgui && !mouse_dragging_extern_payload)
|
||||
g.HoveredWindow = g.HoveredRootWindow = NULL;
|
||||
|
||||
// Scale & Scrolling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue