diff --git a/main/gui/source/window/win_window.cpp b/main/gui/source/window/win_window.cpp index 42493b18b..cbb5f71eb 100644 --- a/main/gui/source/window/win_window.cpp +++ b/main/gui/source/window/win_window.cpp @@ -256,10 +256,17 @@ namespace hex { RegionTop * (cursor.y < (window.top + border.y)) | RegionBottom * (cursor.y >= (window.bottom - border.y)); - if (result != 0 && (ImGui::IsAnyItemHovered() || ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId))) { + if (result != 0 && (ImGui::IsAnyItemHovered())) { break; } + if (ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId)) { + if (result == RegionClient) + return HTCLIENT; + else + return HTCAPTION; + } + std::string_view hoveredWindowName = GImGui->HoveredWindow == nullptr ? "" : GImGui->HoveredWindow->Name; if (!ImHexApi::System::impl::isWindowResizable()) {