From 89b94ebbf9d7bcb158667696c901f05c96ac5314 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 17 Aug 2025 10:33:26 +0200 Subject: [PATCH] fix: Buttons near the edges of the Window not reacting correctly to clicks #2413 --- main/gui/source/window/platform/windows.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/gui/source/window/platform/windows.cpp b/main/gui/source/window/platform/windows.cpp index 07884266b..f132ffe42 100644 --- a/main/gui/source/window/platform/windows.cpp +++ b/main/gui/source/window/platform/windows.cpp @@ -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;