Sine Striker
2024-01-03 7990ac78e1938536650456bf987a4c986a4e6f1b
src/core/shared/systemwindow_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef SYSTEMWINDOW_P_H
@@ -18,12 +19,7 @@
#include <QWKCore/private/qwkglobal_p.h>
// Don't include this header in any header files.
namespace QWK {
    // Anonymous namespace
    namespace {
        class WindowMoveManipulator : public QObject {
        public:
@@ -118,15 +114,13 @@
            Qt::Edges resizeEdges;
        };
    }
    // QWindow::startSystemMove() and QWindow::startSystemResize() is first supported at Qt 5.15
    // QWindow::startSystemResize() returns false on macOS
    // QWindow::startSystemMove() and QWindow::startSystemResize() returns false on Linux Unity DE
    // When the new API fails, we emulate the window actions using the classical API.
    static inline void startSystemMove(QWindow *window) {
    inline void startSystemMove(QWindow *window) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
        std::ignore = new WindowMoveManipulator(window);
#elif defined(Q_OS_LINUX)
@@ -139,7 +133,7 @@
#endif
    }
    static inline void startSystemResize(QWindow *window, Qt::Edges edges) {
    inline void startSystemResize(QWindow *window, Qt::Edges edges) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
        std::ignore = new WindowResizeManipulator(window, edges);
#elif defined(Q_OS_MAC) || defined(Q_OS_LINUX)