From 4093fadcae865049e489ceedb1653f71bdfb2de8 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 4 Feb 2024 14:59:33 +0100 Subject: [PATCH] fix: Revert Windows title bar changes since window wasn't draggable anymore --- main/gui/source/window/win_window.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/main/gui/source/window/win_window.cpp b/main/gui/source/window/win_window.cpp index 1c273f4f3..f7805d7ee 100644 --- a/main/gui/source/window/win_window.cpp +++ b/main/gui/source/window/win_window.cpp @@ -33,7 +33,6 @@ namespace hex { static LONG_PTR s_oldWndProc; static float s_titleBarHeight; static Microsoft::WRL::ComPtr s_taskbarList; - static bool s_mouseButtonDown = false; void nativeErrorMessage(const std::string &message) { log::fatal(message); @@ -132,12 +131,6 @@ namespace hex { switch (uMsg) { case WM_MOUSELAST: break; - case WM_NCLBUTTONDOWN: - s_mouseButtonDown = true; - break; - case WM_NCLBUTTONUP: - s_mouseButtonDown = false; - break; case WM_NCACTIVATE: case WM_NCPAINT: // Handle Windows Aero Snap @@ -229,14 +222,12 @@ namespace hex { return HTBOTTOMRIGHT; case RegionClient: default: - if (cursor.y < (window.top + s_titleBarHeight * 2) && !s_mouseButtonDown) { + if (cursor.y < (window.top + s_titleBarHeight * 2)) { if (hoveredWindowName == "##MainMenuBar" || hoveredWindowName == "ImHexDockSpace") { if (!ImGui::IsAnyItemHovered()) { return HTCAPTION; } } - } else { - return HTCLIENT; } break;