From c3ef42dad254f6d04cab521c9ae619a46bb84f7a Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 21 11æ 2024 21:17:32 +0800 Subject: [PATCH] Fix #151 and a crash bug related to sub frameless window --- 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