From f01164481c423b496d899532154914fbecebef35 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周六, 24 2月 2024 04:13:51 +0800 Subject: [PATCH] minor tweaks --- src/core/contexts/win32windowcontext.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 25a5d8a..9a0d786 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -443,9 +443,12 @@ return false; } - static inline bool forwardFilteredEvents(QWindow *window, HWND hWnd, UINT message, - WPARAM wParam, LPARAM lParam, LRESULT *result) { + static inline bool forwardFilteredEvent(QWindow *window, HWND hWnd, UINT message, WPARAM wParam, + LPARAM lParam, LRESULT *result) { MSG msg = createMessageBlock(hWnd, message, wParam, lParam); + + // https://github.com/qt/qtbase/blob/e26a87f1ecc40bc8c6aa5b889fce67410a57a702/src/plugins/platforms/windows/qwindowscontext.cpp#L1025 + // Do exact the same as what Qt Windows plugin does. // Run the native event filters. QTBUG-67095: Exclude input messages which are sent // by QEventDispatcherWin32::processEvents() @@ -592,7 +595,7 @@ // Forward the event to user-defined native event filters, there may be some messages // that need to be processed by the user. std::ignore = - forwardFilteredEvents(ctx->window(), hWnd, message, wParam, lParam, &result); + forwardFilteredEvent(ctx->window(), hWnd, message, wParam, lParam, &result); return result; } @@ -1480,11 +1483,8 @@ // Terminal does, however, later I found that if we choose a proper // color, our homemade top border can almost have exactly the same // appearance with the system's one. - qDebug() << QDateTime::currentDateTime() << "HITTEST"; [[maybe_unused]] const auto &hitTestRecorder = qScopeGuard([this, result]() { lastHitTestResult = getHitWindowPart(int(*result)); // - - qDebug() << lastHitTestResult; }); POINT nativeGlobalPos{GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; -- Gitblit v1.9.1