Browse Source

Fixed crash on right-click without modal, introduced by previous commit a3667f46, (#4729)

pull/4767/head
ocornut 3 years ago
parent
commit
764f9e606d
  1. 2
      imgui.cpp

2
imgui.cpp

@ -3712,7 +3712,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
// Find the top-most window between HoveredWindow and the top-most Modal Window.
// This is where we can trim the popup stack.
ImGuiWindow* modal = GetTopMostPopupModal();
bool hovered_window_above_modal = g.HoveredWindow && IsWindowAbove(g.HoveredWindow, modal);
bool hovered_window_above_modal = g.HoveredWindow && (modal == NULL || IsWindowAbove(g.HoveredWindow, modal));
ClosePopupsOverWindow(hovered_window_above_modal ? g.HoveredWindow : modal, true);
}
}

Loading…
Cancel
Save