From 0ab200f77f1ad6b4f6f38869f58b739c977c50c7 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 30 May 2024 22:01:18 +0200 Subject: [PATCH] fix: Hex editor popups closing when opening sub-popups --- plugins/builtin/source/content/views/view_hex_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 6d378ed55..443073ec0 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -608,7 +608,7 @@ namespace hex::plugin::builtin { m_currentPopupHasHovered = false; } - m_currentPopupHover = ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem); + m_currentPopupHover = ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_RootAndChildWindows); m_currentPopupDetached = !ImGui::GetCurrentWindow()->ViewportOwned; m_currentPopupHasHovered |= m_currentPopupHover; @@ -618,7 +618,7 @@ namespace hex::plugin::builtin { this->closePopup(); } - if ((m_currPopup != nullptr && !m_currPopup->isPinned() && !ImGui::IsWindowFocused() && !ImGui::IsWindowHovered()) || !open) { + if ((m_currPopup != nullptr && !m_currPopup->isPinned() && !ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && !ImGui::IsWindowHovered()) || !open) { this->closePopup(); }