File indexing completed on 2024-11-24 03:41:31
0001 /* 0002 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #ifndef WINDOWSYSTEM_H 0007 #define WINDOWSYSTEM_H 0008 0009 #include "kwindowsystem_p.h" 0010 0011 #include <QObject> 0012 0013 class WindowManagement; 0014 0015 class WindowSystem : public QObject, public KWindowSystemPrivateV2 0016 { 0017 Q_OBJECT 0018 public: 0019 WindowSystem(); 0020 ~WindowSystem() override; 0021 void activateWindow(QWindow *win, long time) override; 0022 void requestToken(QWindow *win, uint32_t serial, const QString &app_id) override; 0023 quint32 lastInputSerial(QWindow *window) override; 0024 void setCurrentToken(const QString &token) override; 0025 bool showingDesktop() override; 0026 void setShowingDesktop(bool showing) override; 0027 void exportWindow(QWindow *window) override; 0028 void unexportWindow(QWindow *window) override; 0029 void setMainWindow(QWindow *window, const QString &handle) override; 0030 0031 protected: 0032 bool eventFilter(QObject *watched, QEvent *event) override; 0033 0034 private: 0035 void doSetMainWindow(QWindow *window, const QString &handle); 0036 QString m_lastToken; 0037 WindowManagement *m_windowManagement; 0038 }; 0039 0040 #endif