Zhao Yuhang
2023-12-13 59207cbc449e2e69e6b794115f8aeae168dba405
minor tweaks
2个文件已修改
40 ■■■■■ 已修改文件
src/core/contexts/cocoawindowcontext.mm 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext.cpp 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/cocoawindowcontext.mm
@@ -9,7 +9,7 @@
    }
    QString CocoaWindowContext::key() const {
        return "cocoa";
        return QStringLiteral("cocoa");
    }
    void CocoaWindowContext::virtual_hook(int id, void *data) {
src/core/contexts/win32windowcontext.cpp
@@ -1944,7 +1944,7 @@
            case WM_DWMCOLORIZATIONCOLORCHANGED: {
                const QColor color = QColor::fromRgba(wParam);
                const auto blendWithOpacity = *reinterpret_cast<LPBOOL>(lParam);
                const auto blendedWithOpacity = *reinterpret_cast<LPBOOL>(lParam);
                QEvent e(QEvent::UpdateLater);
                dispatch(&e);
@@ -1955,47 +1955,13 @@
                if (!wParam && lParam &&
                    std::wcscmp(reinterpret_cast<LPCWSTR>(lParam), L"ImmersiveColorSet") == 0) {
                    const QColor color = getAccentColor();
                }
                QEvent e(QEvent::UpdateLater);
                dispatch(&e);
                }
                break;
            }
            // case WM_SIZE: {
            //     const bool max = wParam == SIZE_MAXIMIZED;
            //     const bool min = wParam == SIZE_MINIMIZED;
            //     const bool full = isFullScreen(hWnd);
            //     Qt::WindowStates states{};
            //     if (max) {
            //         states |= Qt::WindowMaximized;
            //     }
            //     if (min) {
            //         states |= Qt::WindowMinimized;
            //     }
            //     if (full) {
            //         states |= Qt::WindowFullScreen;
            //     }
            //     // QTimer::singleShot(0, this, [this, states] {
            //     QWindowStateChangeEvent e(states);
            //     dispatch(&e);
            //     // });
            //     break;
            // }
            // case WM_ACTIVATE: {
            //     const auto state = LOWORD(wParam);
            //     const bool active = state == WA_ACTIVE || state == WA_CLICKACTIVE;
            //     Q_UNUSED(state)
            //     // QTimer::singleShot(0, this, [this, active] {
            //     QEvent e(active ? QEvent::WindowActivate : QEvent::WindowDeactivate);
            //     dispatch(&e);
            //     // });
            //     break;
            // }
            default:
                break;
        }