Zhao Yuhang
2023-12-20 503d6461cde51aefeea73fc956264cbc815e9c14
src/core/contexts/cocoawindowcontext.mm
@@ -7,6 +7,7 @@
#include "qwkglobal_p.h"
#include "systemwindow_p.h"
namespace QWK {
    struct NSWindowProxy {
@@ -221,6 +222,7 @@
    static inline void releaseWindowProxy(const WId windowId) {
        if (const auto proxy = g_proxyList()->take(windowId)) {
            proxy->setSystemTitleBarVisible(true);
            delete proxy;
        }
    }
@@ -384,7 +386,7 @@
                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-system-buttons")) {
                    if (newVar.toBool()) {
                        // TODO: set off
@@ -392,7 +394,7 @@
                        // TODO: set on
                    }
                }
                break;
                return;
            }
            default:
@@ -401,7 +403,7 @@
        AbstractWindowContext::virtual_hook(id, data);
    }
    void CocoaWindowContext::winIdChanged(QWindow *oldWindow) {
    void CocoaWindowContext::winIdChanged(QWindow *oldWindow, bool isDestroyed) {
        releaseWindowProxy(windowId);
        if (!m_windowHandle) {
            return;