/* * Copyright 2016 Smith AR * Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef WAYLANDINTERFACE_H #define WAYLANDINTERFACE_H #include "abstractwindowinterface.h" #include "windowinfowrap.h" #include #include #include #include #include #include #include #include #include #include namespace Latte { namespace Private { /** * @brief this class is use for create the struts inside wayland */ class GhostWindow; } class WaylandInterface : public AbstractWindowInterface { Q_OBJECT public: explicit WaylandInterface(QObject *parent = nullptr); ~WaylandInterface() override; void setDockExtraFlags(QWindow &view) override; void setDockStruts(QWindow &view, const QRect &rect , Plasma::Types::Location location) override; void setWindowOnActivities(QWindow &view, const QStringList &activities) override; void removeDockStruts(QWindow &view) const override; WindowId activeWindow() const override; WindowInfoWrap requestInfo(WindowId wid) const override; WindowInfoWrap requestInfoActive() const override; bool isOnCurrentDesktop(WindowId wid) const override; bool isOnCurrentActivity(WindowId wid) const override; const std::list &windows() const override; void setKeepAbove(const QDialog &dialog, bool above = true) const override; void skipTaskBar(const QDialog &dialog) const override; void slideWindow(QWindow &view, Slide location) const override; void enableBlurBehind(QWindow &view) const override; private: void init(); inline bool isValidWindow(const KWayland::Client::PlasmaWindow *w) const; void windowCreatedProxy(KWayland::Client::PlasmaWindow *w); QSignalMapper *mapper{nullptr}; friend class Private::GhostWindow; mutable QMap m_ghostWindows; KWayland::Client::Registry *m_registry{nullptr}; KWayland::Client::ConnectionThread *m_connection{nullptr}; KWayland::Client::PlasmaWindowManagement *m_wm{nullptr}; KWayland::Client::PlasmaShell *m_plasmaShell{nullptr}; }; } #endif // WAYLANDINTERFACE_H