From 394a42cb9464877174b164bc9490e7a74f646f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sun, 5 May 2024 21:33:47 +0800 Subject: [PATCH] update --- src/CMakeLists.txt | 2 +- src/FluFrameless.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6e1b55e7..9ae5ad36 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -180,7 +180,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Qml ) -if (${QT_VERSION_MAJOR} LESS_EQUAL 6) +if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release")) find_program(QML_PLUGIN_DUMP NAMES qmlplugindump) add_custom_target(Script-Generate-QmlTypes COMMAND ${QML_PLUGIN_DUMP} -nonrelocatable FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes diff --git a/src/FluFrameless.cpp b/src/FluFrameless.cpp index 862842f4..e526f633 100644 --- a/src/FluFrameless.cpp +++ b/src/FluFrameless.cpp @@ -259,17 +259,27 @@ void FluFrameless::componentComplete() { *result = HTCLIENT; return true; } else if (uMsg == WM_NCPAINT) { +#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0)) + *result = FALSE; + return true; +#else if (isCompositionEnabled()) { return false; } *result = FALSE; return true; +#endif } else if (uMsg == WM_NCACTIVATE) { +#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0)) + *result = TRUE; + return true; +#else if (isCompositionEnabled()) { return false; } *result = TRUE; return true; +#endif } else if (uMsg == WM_GETMINMAXINFO) { #if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0)) auto *minmaxInfo = reinterpret_cast(lParam);