fix: Main Window being moved when window overlapping titlebar is moved
This commit is contained in:
parent
29dd3d5fc3
commit
27f420c8ea
@ -194,6 +194,8 @@ namespace hex {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string_view hoveredWindowName = GImGui->HoveredWindow == nullptr ? "" : GImGui->HoveredWindow->Name;
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case RegionLeft:
|
case RegionLeft:
|
||||||
return HTLEFT;
|
return HTLEFT;
|
||||||
@ -213,9 +215,10 @@ namespace hex {
|
|||||||
return HTBOTTOMRIGHT;
|
return HTBOTTOMRIGHT;
|
||||||
case RegionClient:
|
case RegionClient:
|
||||||
default:
|
default:
|
||||||
if ((cursor.y < (window.top + g_titleBarHeight * 2)) && !(ImGui::IsAnyItemHovered() || ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId)))
|
if ((cursor.y < (window.top + g_titleBarHeight * 2)) && !ImGui::IsAnyItemHovered() && (hoveredWindowName == "##MainMenuBar" || hoveredWindowName == "ImHexDockSpace"))
|
||||||
return HTCAPTION;
|
return HTCAPTION;
|
||||||
else break;
|
else
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user