File indexing completed on 2025-02-16 14:22:57
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef FULLSCREENOVERLAY_H 0007 #define FULLSCREENOVERLAY_H 0008 0009 #include <QQuickWindow> 0010 0011 namespace KWayland 0012 { 0013 namespace Client 0014 { 0015 class PlasmaShell; 0016 class PlasmaShellSurface; 0017 class Surface; 0018 } 0019 } 0020 0021 class FullScreenOverlay : public QQuickWindow 0022 { 0023 Q_OBJECT 0024 Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) 0025 Q_PROPERTY(bool acceptsFocus MEMBER m_acceptsFocus NOTIFY acceptsFocusChanged) 0026 0027 public: 0028 explicit FullScreenOverlay(QQuickWindow *parent = nullptr); 0029 ~FullScreenOverlay() override; 0030 0031 Q_SIGNALS: 0032 void activeChanged(); // clazy:exclude=overridden-signal 0033 void acceptsFocusChanged(); 0034 0035 protected: 0036 bool event(QEvent *event) override; 0037 0038 private: 0039 void initWayland(); 0040 KWayland::Client::PlasmaShellSurface *m_plasmaShellSurface = nullptr; 0041 KWayland::Client::Surface *m_surface = nullptr; 0042 KWayland::Client::PlasmaShell *m_plasmaShellInterface = nullptr; 0043 bool m_acceptsFocus = true; 0044 }; 0045 0046 #endif