From 2fe4fc2a5d49ed1adfe084eca0ffad4c1c73f4ae Mon Sep 17 00:00:00 2001 From: routersys Date: Mon, 24 Aug 2026 19:04:39 +0900 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=9B=A2=E3=82=A6=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=82=A6=E3=81=AE=E7=A7=BB=E5=8B=95=E9=96=8B=E5=A7=8B?= =?UTF-8?q?=E3=82=92=E6=8D=89=E3=81=88=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/FloatWindowHook.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/FloatWindowHook.cpp b/src/FloatWindowHook.cpp index dfe6347..466a88b 100644 --- a/src/FloatWindowHook.cpp +++ b/src/FloatWindowHook.cpp @@ -29,6 +29,14 @@ static void Unhook(HWND window) { static LRESULT CALLBACK FloatProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { switch (msg) { + case WM_SYSCOMMAND: + if ((wp & 0xFFF0) == SC_MOVE) Drag().BeginFloat(hwnd); + break; + + case WM_SIZING: + if (Drag().Window() == hwnd) Drag().Cancel(); + break; + case WM_MOVING: { if (!Drag().Dragging()) Drag().BeginFloat(hwnd); if (Drag().Window() == hwnd) { @@ -41,7 +49,7 @@ static LRESULT CALLBACK FloatProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { case WM_EXITSIZEMOVE: { const LRESULT result = CallOriginalProc(hwnd, msg, wp, lp); - if (Drag().Dragging() && Drag().Window() == hwnd) { + if (Drag().Window() == hwnd) { POINT cursor = {}; GetCursorPos(&cursor); Drag().Commit(cursor);