From 91274c58b1772dfe38d3fcab291693141e822684 Mon Sep 17 00:00:00 2001 From: Daniel <49284193+dnlkrs@users.noreply.github.com> Date: 周五, 06 12月 2024 21:55:30 +0800 Subject: [PATCH] Fix WindowsRegistryKey for Qt 6.8.1 (#154) --- src/core/contexts/win32windowcontext.cpp | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 8ad7ae8..6d54ad6 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -827,6 +827,10 @@ return isSystemBorderEnabled() && !isWin11OrGreater(); } + if (key == QStringLiteral("windows-system-border-enabled")) { + return isSystemBorderEnabled(); + } + if (key == QStringLiteral("border-thickness")) { return m_windowId ? int(getWindowFrameBorderThickness(reinterpret_cast<HWND>(m_windowId))) @@ -845,16 +849,10 @@ lastHitTestResult = WindowPart::Outside; lastHitTestResultRaw = HTNOWHERE; - if (!isSystemBorderEnabled()) { - m_delegate->setWindowFlags(m_host, m_delegate->getWindowFlags(m_host) | - Qt::FramelessWindowHint); - } - // If the original window id is valid, remove all resources related if (oldWinId) { removeManagedWindow(reinterpret_cast<HWND>(oldWinId)); } - if (!winId) { return; } -- Gitblit v1.9.1