From 38700ac4e6864e94a5435b19b803282bac2f6f5b Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周日, 17 12月 2023 22:35:17 +0800 Subject: [PATCH] Add TODO encounting a new bug --- src/core/contexts/win32windowcontext.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 32763a5..95f6e1a 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -786,14 +786,14 @@ void Win32WindowContext::virtual_hook(int id, void *data) { switch (id) { case CentralizeHook: { - const auto hwnd = reinterpret_cast<HWND>(m_windowHandle->winId()); + const auto hwnd = reinterpret_cast<HWND>(windowId); moveToDesktopCenter(hwnd); return; } case ShowSystemMenuHook: { const auto &pos = *static_cast<const QPoint *>(data); - auto hWnd = reinterpret_cast<HWND>(m_windowHandle->winId()); + auto hWnd = reinterpret_cast<HWND>(windowId); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const QPoint nativeGlobalPos = QHighDpi::toNativeGlobalPosition(pos, m_windowHandle); @@ -820,7 +820,7 @@ auto &painter = *static_cast<QPainter *>(args[0]); const auto &rect = *static_cast<const QRect *>(args[1]); const auto ®ion = *static_cast<const QRegion *>(args[2]); - const auto hwnd = reinterpret_cast<HWND>(m_windowHandle->winId()); + const auto hwnd = reinterpret_cast<HWND>(windowId); QPen pen; pen.setWidth(getWindowFrameBorderThickness(hwnd) * 2); -- Gitblit v1.9.1