1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-25 09:33:51 +03:00
latte-dock/app/wm/xwindowinterface.h
Michail Vourlakos d3b5e2c4eb remove gtk_frame_extents from window geometries
--under x11 environment remove the gtk_frame_extents that
are used for shadows under plasma environment

BUG:417856
2020-03-06 21:45:54 +02:00

109 lines
3.5 KiB
C++

/*
* Copyright 2016 Smith AR <audoban@openmailbox.org>
* Michail Vourlakos <mvourlakos@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef XWINDOWINTERFACE_H
#define XWINDOWINTERFACE_H
// local
#include <config-latte.h>
#include "abstractwindowinterface.h"
#include "windowinfowrap.h"
// Qt
#include <QObject>
// KDE
#include <KWindowInfo>
#include <KWindowEffects>
namespace Latte {
namespace WindowSystem {
class XWindowInterface : public AbstractWindowInterface
{
Q_OBJECT
public:
explicit XWindowInterface(QObject *parent = nullptr);
~XWindowInterface() override;
void setViewExtraFlags(QObject *view, bool isPanelWindow = true, Latte::Types::Visibility mode = Latte::Types::WindowsGoBelow) override;
void setViewStruts(QWindow &view, const QRect &rect, Plasma::Types::Location location) override;
void setWindowOnActivities(QWindow &window, const QStringList &activities) override;
void removeViewStruts(QWindow &view) const override;
WindowId activeWindow() const override;
WindowInfoWrap requestInfo(WindowId wid) const override;
WindowInfoWrap requestInfoActive() const override;
void skipTaskBar(const QDialog &dialog) const override;
void slideWindow(QWindow &view, Slide location) const override;
void enableBlurBehind(QWindow &view) const override;
void requestActivate(WindowId wid) const override;
void requestClose(WindowId wid) const override;
void requestMoveWindow(WindowId wid, QPoint from) const override;
void requestToggleIsOnAllDesktops(WindowId wid) const override;
void requestToggleKeepAbove(WindowId wid) const override;
void requestToggleMinimized(WindowId wid) const override;
void requestToggleMaximized(WindowId wid) const override;
void setKeepAbove(WindowId wid, bool active) const override;
void setKeepBelow(WindowId wid, bool active) const override;
bool windowCanBeDragged(WindowId wid) const override;
bool windowCanBeMaximized(WindowId wid) const override;
QIcon iconFor(WindowId wid) const override;
WindowId winIdFor(QString appId, QRect geometry) const override;
WindowId winIdFor(QString appId, QString title) const override;
AppData appDataFor(WindowId wid) const override;
void setActiveEdge(QWindow *view, bool active) const override;
void switchToNextVirtualDesktop() const override;
void switchToPreviousVirtualDesktop() const override;
private:
bool isValidWindow(WindowId wid) const;
bool isValidWindow(const KWindowInfo &winfo) const;
bool isFullScreenWindow(WindowId wid) const;
#if KF5_VERSION_MINOR >= 65
QRect visibleGeometry(const WindowId &wid, const QRect &frameGeometry) const;
#endif
bool isAcceptableWindow(WId wid);
void windowAddedProxy(WId wid);
void windowChangedProxy(WId wid, NET::Properties prop1, NET::Properties2 prop2);
QUrl windowUrl(WindowId wid) const;
};
}
}
#endif // XWINDOWINTERFACE_H