From 187f82bb4065589fa7fba5f6fa9bd51113357a2c Mon Sep 17 00:00:00 2001
From: SineStriker <trueful@163.com>
Date: 周一, 18 12月 2023 14:29:35 +0800
Subject: [PATCH] minor tweaks

---
 src/core/contexts/qtwindowcontext.cpp |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/core/contexts/qtwindowcontext.cpp b/src/core/contexts/qtwindowcontext.cpp
index 45aed07..35fc2d1 100644
--- a/src/core/contexts/qtwindowcontext.cpp
+++ b/src/core/contexts/qtwindowcontext.cpp
@@ -253,10 +253,11 @@
         AbstractWindowContext::virtual_hook(id, data);
     }
 
-    bool QtWindowContext::winIdChanged() {
-        m_delegate->setWindowFlags(m_host, Qt::FramelessWindowHint);
-        std::ignore = new QtWindowEventFilter(this, this);
-        return true;
+    void QtWindowContext::winIdChanged(QWindow *oldWindow) {
+        Q_UNUSED(oldWindow)
+        m_delegate->setWindowFlags(m_host,
+                                   m_delegate->getWindowFlags(m_host) | Qt::FramelessWindowHint);
+        qtWindowEventFilter = std::make_unique<QtWindowEventFilter>(this);
     }
 
-}
\ No newline at end of file
+}

--
Gitblit v1.9.1