From a02210a455b2899f3fc01d7f57a3c6bdd77ef38a Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 26 Aug 2017 00:31:17 +0800 Subject: [PATCH] Fixed compilation with IMGUI_DISABLE_OBSOLETE_FUNCTIONS defined --- imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index be7b018d..9f8a0c5f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3607,7 +3607,7 @@ bool ImGui::BeginPopupContextWindow(const char* str_id, int mouse_button, bool a { if (!str_id) str_id = "window_context"; - if (IsMouseHoveringWindow() && IsMouseClicked(mouse_button)) + if (IsWindowRectHovered() && IsMouseClicked(mouse_button)) if (also_over_items || !IsAnyItemHovered()) OpenPopupEx(GImGui->CurrentWindow->GetID(str_id), true); return BeginPopup(str_id); @@ -3617,7 +3617,7 @@ bool ImGui::BeginPopupContextVoid(const char* str_id, int mouse_button) { if (!str_id) str_id = "void_context"; - if (!IsMouseHoveringAnyWindow() && IsMouseClicked(mouse_button)) + if (!IsAnyWindowHovered() && IsMouseClicked(mouse_button)) OpenPopupEx(GImGui->CurrentWindow->GetID(str_id), true); return BeginPopup(str_id); }