1
0
mirror of synced 2024-11-14 11:07:43 +01:00

fix: Resizing on windows still being janky

This commit is contained in:
WerWolv 2023-05-11 18:43:19 +02:00
parent 2e73d74cea
commit 49371398bc

View File

@ -138,8 +138,8 @@ namespace hex {
POINT cursor = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; POINT cursor = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
const POINT border { const POINT border {
static_cast<LONG>((::GetSystemMetrics(SM_CXFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getNativeScale()), static_cast<LONG>((::GetSystemMetrics(SM_CXFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getGlobalScale()),
static_cast<LONG>((::GetSystemMetrics(SM_CYFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getNativeScale()) static_cast<LONG>((::GetSystemMetrics(SM_CYFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER)) * ImHexApi::System::getGlobalScale())
}; };
RECT window; RECT window;
@ -159,12 +159,7 @@ namespace hex {
RegionTop * (cursor.y < (window.top + border.y)) | RegionTop * (cursor.y < (window.top + border.y)) |
RegionBottom * (cursor.y >= (window.bottom - border.y)); RegionBottom * (cursor.y >= (window.bottom - border.y));
if (result != 0 && (ImGui::IsItemHovered() || ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId))) if (result != 0 && (ImGui::IsAnyItemHovered() || 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"))
break; break;
switch (result) { switch (result) {