/* SPDX-FileCopyrightText: 2020 Michail Vourlakos SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef PLASMASCREENGEOMETRIES_H #define PLASMASCREENGEOMETRIES_H // local #include // Qt #include #include #include #include namespace Latte { class Corona; class View; } namespace Latte { namespace PlasmaExtended { class ScreenGeometries: public QObject { Q_OBJECT public: ScreenGeometries(Latte::Corona *parent); ~ScreenGeometries() override; private slots: void availableScreenGeometryChangedFrom(Latte::View *origin); void init(); void updateGeometries(); private slots: bool screenIsActive(const QString &screenName) const; private: bool m_plasmaInterfaceAvailable{false}; bool m_forceGeometryBroadcast{false}; //! this is needed in order to avoid too many costly calculations for available screen geometries QTimer m_publishTimer; //! this is needed in order to check if Plasma>=5.18 is running QTimer m_startupInitTimer; Latte::Corona *m_corona{nullptr}; QList m_ignoreModes{ Latte::Types::AutoHide, Latte::Types::SidebarOnDemand, Latte::Types::SidebarAutoHide }; QStringList m_lastScreenNames; QHash m_lastAvailableRect; QHash m_lastAvailableRegion; QDBusServiceWatcher *m_plasmaServiceWatcher{nullptr}; }; } } #endif