fix: Buttons near the edges of the Window not reacting correctly to clicks

#2413
This commit is contained in:
WerWolv
2025-08-17 10:33:26 +02:00
parent 5666baf2bc
commit 89b94ebbf9

View File

@@ -267,6 +267,13 @@ namespace hex {
RegionTop * (cursor.y < (window.top + border.y)) |
RegionBottom * (cursor.y >= (window.bottom - border.y));
// If the mouse is hovering over any button, disable resize controls.
// Without this, the window buttons and menu bar would not be clickable
// correctly at the edges of the window.
if (result != 0 && (ImGui::IsAnyItemHovered())) {
break;
}
if (ImGui::IsPopupOpen(nullptr, ImGuiPopupFlags_AnyPopupId)) {
if (result == RegionClient)
return HTCLIENT;