From fe50d30edcc31618905ec3e3dc39c8b78cee49db Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 周二, 19 12月 2023 18:09:23 +0800
Subject: [PATCH] minor tweaks

---
 src/core/contexts/win32windowcontext.cpp |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index cda9058..0e84db1 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -812,6 +812,11 @@
                 return;
             }
 
+            case RaiseWindowHook: {
+                // FIXME
+                return;
+            }
+
             case ShowSystemMenuHook: {
                 const auto &pos = *static_cast<const QPoint *>(data);
                 auto hWnd = reinterpret_cast<HWND>(windowId);
@@ -824,6 +829,23 @@
                 showSystemMenu2(hWnd, qpoint2point(nativeGlobalPos), false,
                                 m_delegate->isHostSizeFixed(m_host));
                 return;
+            }
+
+            case WindowAttributeChangedHook: {
+                auto args = static_cast<void **>(data);
+                const auto &key = *static_cast<const QString *>(args[0]);
+                const auto &newVar = *static_cast<const QVariant *>(args[1]);
+                const auto &oldVar = *static_cast<const QVariant *>(args[2]);
+
+                if (key == QStringLiteral("no-frame-shadow")) {
+                    if (newVar.toBool()) {
+                        // TODO: set off
+                    } else {
+                        // TODO: set on
+                    }
+                }
+
+                break;
             }
 
             case DefaultColorsHook: {
@@ -893,10 +915,7 @@
     }
 
     void Win32WindowContext::winIdChanged(QWindow *oldWindow) {
-        if (oldWindow) {
-            removeManagedWindow(reinterpret_cast<HWND>(windowId));
-        }
-
+        removeManagedWindow(reinterpret_cast<HWND>(windowId));
         if (!m_windowHandle) {
             return;
         }

--
Gitblit v1.9.1