From 54623b054721d42db721d0ba7429b6f8878fc1a5 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周二, 26 12月 2023 02:44:18 +0800 Subject: [PATCH] minor tweaks --- src/widgets/widgetwindowagent_win.cpp | 6 +++--- qmsetup | 2 +- src/CMakeLists.txt | 37 ------------------------------------- src/core/contexts/win32windowcontext.cpp | 4 ++-- 4 files changed, 6 insertions(+), 43 deletions(-) diff --git a/qmsetup b/qmsetup index fcfb0c5..17be544 160000 --- a/qmsetup +++ b/qmsetup @@ -1 +1 @@ -Subproject commit fcfb0c5784624f3d2d71bce672149caf414aa1cb +Subproject commit 17be544bc9fd7b6c45a0bf77256655782488b898 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 572cb88..97a7669 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -139,43 +139,6 @@ endif() # ---------------------------------- -# Documentation -# ---------------------------------- -if(QWINDOWKIT_BUILD_DOCUMENTATIONS) - if(NOT DOXYGEN_EXECUTABLE) - find_package(Doxygen REQUIRED) - endif() - - set(_install_options) - - if(QWINDOWKIT_INSTALL) - set(_install_options INSTALL_DIR share/doc/${QWINDOWKIT_INSTALL_NAME}) - endif() - - set(_doc_targets ${QWINDOWKIT_ENABLED_TARGETS}) - - set(QWINDOWKIT_DOXYGEN_TAGFILE - ${CMAKE_BUILD_SHARE_DIR}/doc/${QWINDOWKIT_INSTALL_NAME}/${QWINDOWKIT_INSTALL_NAME}_tagfile.xml - CACHE FILEPATH "QWindowKit doxygen tag file path" FORCE - ) - - qm_import(Doxygen) - qm_setup_doxygen(QWindowKit_RunDoxygen - NAME "QWindowKit" - DESCRIPTION "${QWINDOWKIT_PROJECT_DESCRIPTION}" - MDFILE ../README.md - OUTPUT_DIR ${CMAKE_BUILD_SHARE_DIR}/doc/${QWINDOWKIT_INSTALL_NAME} - INPUT ${QWINDOWKIT_ENABLED_SUBDIRECTORIES} - TARGETS ${_doc_targets} - DEPENDS ${_doc_targets} - NO_EXPAND_MACROS Q_OBJECT Q_GADGET Q_DECLARE_TR_FUNCTIONS - COMPILE_DEFINITIONS Q_SIGNALS=Q_SIGNALS Q_SLOTS=Q_SLOTS - GENERATE_TAGFILE "${QWINDOWKIT_DOXYGEN_TAGFILE}" - ${_install_options} - ) -endif() - -# ---------------------------------- # Install # ---------------------------------- if(QWINDOWKIT_INSTALL) diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index bf25bdb..98f47d6 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -723,8 +723,8 @@ auto hWnd = reinterpret_cast<HWND>(winId); if (!isSystemBorderEnabled()) { - setWindowAttribute(QStringLiteral("extra-margins"), - QVariant::fromValue(QMargins(1, 1, 1, 1))); + static auto margins = QVariant::fromValue(QMargins(1, 1, 1, 1)); + setWindowAttribute(QStringLiteral("extra-margins"), margins); } { diff --git a/src/widgets/widgetwindowagent_win.cpp b/src/widgets/widgetwindowagent_win.cpp index 3eb6beb..2733f94 100644 --- a/src/widgets/widgetwindowagent_win.cpp +++ b/src/widgets/widgetwindowagent_win.cpp @@ -58,7 +58,7 @@ if (LOWORD(msg->wParam) == WA_INACTIVE) { // https://github.com/microsoft/terminal/blob/71a6f26e6ece656084e87de1a528c4a8072eeabd/src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp#L904 // When the window is inactive, there is a transparency bug in the top - // border and we needs to extend the non-client area to the whole title + // border, and we need to extend the non-client area to the whole title // bar. QRect frame = ctx->windowAttribute(QStringLiteral("title-bar-rect")).toRect(); @@ -100,7 +100,7 @@ static_cast<HackedWindow *>(window)->event(event); // Upon receiving the WM_PAINT message, Qt will redraw the entire view, and we - // must wait for it to finish redrawing before drawing this top border area + // must wait for it to finish redrawing before drawing this top border area. ctx->virtual_hook(AbstractWindowContext::DrawWindows10BorderHook2, nullptr); return true; } @@ -126,7 +126,7 @@ // Due to the timer or user action, Qt will redraw some regions spontaneously, // even if there is no WM_PAINT message, we must wait for it to finish redrawing - // and then update the upper border area + // and then update the top border area. ctx->virtual_hook(AbstractWindowContext::DrawWindows10BorderHook2, nullptr); return true; } -- Gitblit v1.9.1