From dddf96c011723a12b11acc2980c10eb370961021 Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周五, 15 12月 2023 21:35:17 +0800
Subject: [PATCH] add qt impl

---
 src/core/contexts/cocoawindowcontext.mm |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/core/contexts/cocoawindowcontext.mm b/src/core/contexts/cocoawindowcontext.mm
index fc91cad..ffd3b87 100644
--- a/src/core/contexts/cocoawindowcontext.mm
+++ b/src/core/contexts/cocoawindowcontext.mm
@@ -238,11 +238,9 @@
         return it.value();
     }
 
-    CocoaWindowContext::CocoaWindowContext() {
-    }
+    CocoaWindowContext::CocoaWindowContext() : AbstractWindowContext() {}
 
-    CocoaWindowContext::~CocoaWindowContext() {
-    }
+    CocoaWindowContext::~CocoaWindowContext() = default;
 
     QString CocoaWindowContext::key() const {
         return QStringLiteral("cocoa");
@@ -255,10 +253,7 @@
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
         m_windowHandle->setProperty("_q_mac_wantsLayer", 1);
 #endif
-        WId winId = m_windowHandle->winId();
-        ensureWindowProxy(winId)->setSystemTitleBarVisible(false);
-        // Cache window ID
-        windowId = winId;
+        ensureWindowProxy(m_windowHandle->winId())->setSystemTitleBarVisible(false);
         return true;
     }
 

--
Gitblit v1.9.1