fix: Resizing on windows still being janky
This commit is contained in:
parent
2e73d74cea
commit
49371398bc
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user