2020-02-17 18:39:17 +00:00
|
|
|
/*
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2020-02-17 18:39:17 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "abstract_client.h"
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class WaylandClient : public AbstractClient
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
WaylandClient(KWaylandServer::SurfaceInterface *surface);
|
|
|
|
|
|
|
|
QString captionNormal() const override;
|
|
|
|
QString captionSuffix() const override;
|
|
|
|
QStringList activities() const override;
|
|
|
|
void setOnAllActivities(bool set) override;
|
|
|
|
void blockActivityUpdates(bool b = true) override;
|
|
|
|
QPoint clientContentPos() const override;
|
|
|
|
QRect transparentRect() const override;
|
|
|
|
quint32 windowId() const override;
|
|
|
|
pid_t pid() const override;
|
|
|
|
bool isLockScreen() const override;
|
|
|
|
bool isInputMethod() const override;
|
|
|
|
bool isLocalhost() const override;
|
|
|
|
double opacity() const override;
|
|
|
|
void setOpacity(double opacity) override;
|
|
|
|
AbstractClient *findModal(bool allow_itself = false) override;
|
|
|
|
void resizeWithChecks(const QSize &size, ForceGeometry_t force = NormalGeometrySet) override;
|
|
|
|
void killWindow() override;
|
|
|
|
QByteArray windowRole() const override;
|
2020-08-17 08:24:18 +00:00
|
|
|
bool isShown(bool shaded_is_shown) const override;
|
|
|
|
bool isHiddenInternal() const override;
|
|
|
|
void hideClient(bool hide) override;
|
|
|
|
|
|
|
|
bool isHidden() const;
|
2020-02-17 18:39:17 +00:00
|
|
|
|
2020-07-29 16:39:47 +00:00
|
|
|
void updateDepth();
|
2020-02-17 18:39:17 +00:00
|
|
|
void setCaption(const QString &caption);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override;
|
|
|
|
bool belongsToDesktop() const override;
|
|
|
|
void doSetActive() override;
|
|
|
|
void updateCaption() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateClientArea();
|
|
|
|
void updateClientOutputs();
|
|
|
|
void updateIcon();
|
|
|
|
void updateResourceName();
|
2020-08-17 08:24:18 +00:00
|
|
|
void internalShow();
|
|
|
|
void internalHide();
|
2020-02-17 18:39:17 +00:00
|
|
|
|
|
|
|
QString m_captionNormal;
|
|
|
|
QString m_captionSuffix;
|
|
|
|
double m_opacity = 1.0;
|
|
|
|
quint32 m_windowId;
|
2020-08-17 08:24:18 +00:00
|
|
|
bool m_isHidden = false;
|
2020-02-17 18:39:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|