diff --git a/main/source/window/win_window.cpp b/main/source/window/win_window.cpp index 865bf68d7..2d8f44865 100644 --- a/main/source/window/win_window.cpp +++ b/main/source/window/win_window.cpp @@ -138,8 +138,8 @@ namespace hex { POINT cursor = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; const POINT border { - static_cast((::GetSystemMetrics(SM_CXFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getNativeScale()), - static_cast((::GetSystemMetrics(SM_CYFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getNativeScale()) + static_cast((::GetSystemMetrics(SM_CXFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getGlobalScale()), + static_cast((::GetSystemMetrics(SM_CYFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getGlobalScale()) }; RECT window; @@ -159,12 +159,7 @@ namespace hex { RegionTop * (cursor.y < (window.top + border.y)) | RegionBottom * (cursor.y >= (window.bottom - border.y)); - if (result != 0 && (ImGui::IsItemHovered() || ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId))) - break; - - if (GImGui->HoveredWindow != nullptr && - GImGui->HoveredWindow->Name != std::string("##MainMenuBar") && - !std::string_view(GImGui->HoveredWindow->Name).starts_with("ImHexDockSpace")) + if (result != 0 && (ImGui::IsAnyItemHovered() || ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId))) break; switch (result) {