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
|
|
|
|
|
2022-04-22 17:39:12 +00:00
|
|
|
#include "window.h"
|
2020-02-17 18:39:17 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2022-04-22 17:51:07 +00:00
|
|
|
class WaylandWindow : public Window
|
2020-02-17 18:39:17 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-04-22 17:51:07 +00:00
|
|
|
WaylandWindow(KWaylandServer::SurfaceInterface *surface);
|
2020-02-17 18:39:17 +00:00
|
|
|
|
|
|
|
QString captionNormal() const override;
|
|
|
|
QString captionSuffix() const override;
|
|
|
|
pid_t pid() const override;
|
2021-05-25 16:06:17 +00:00
|
|
|
bool isClient() const override;
|
2020-02-17 18:39:17 +00:00
|
|
|
bool isLockScreen() const override;
|
|
|
|
bool isLocalhost() const override;
|
2022-04-22 17:39:12 +00:00
|
|
|
Window *findModal(bool allow_itself = false) override;
|
2022-05-16 20:13:39 +00:00
|
|
|
void resizeWithChecks(const QSizeF &size) override;
|
2020-02-17 18:39:17 +00:00
|
|
|
void killWindow() override;
|
|
|
|
QByteArray windowRole() const override;
|
2021-11-23 12:13:56 +00:00
|
|
|
bool isShown() const override;
|
2020-08-17 08:24:18 +00:00
|
|
|
bool isHiddenInternal() const override;
|
2021-11-03 09:40:31 +00:00
|
|
|
void hideClient() override;
|
|
|
|
void showClient() override;
|
2020-08-17 08:24:18 +00:00
|
|
|
|
2022-05-16 20:13:39 +00:00
|
|
|
virtual QRectF frameRectToBufferRect(const QRectF &rect) const;
|
2020-08-17 08:24:18 +00:00
|
|
|
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:
|
2022-04-22 17:39:12 +00:00
|
|
|
bool belongsToSameApplication(const Window *other, SameApplicationChecks checks) const override;
|
2020-02-17 18:39:17 +00:00
|
|
|
bool belongsToDesktop() const override;
|
|
|
|
void doSetActive() override;
|
|
|
|
void updateCaption() override;
|
2022-05-09 15:47:12 +00:00
|
|
|
WindowItem *createItem() override;
|
2020-02-17 18:39:17 +00:00
|
|
|
|
2020-08-19 08:01:33 +00:00
|
|
|
void cleanGrouping();
|
2022-05-16 20:13:39 +00:00
|
|
|
void updateGeometry(const QRectF &rect);
|
2020-08-18 12:51:20 +00:00
|
|
|
|
2020-02-17 18:39:17 +00:00
|
|
|
private:
|
|
|
|
void updateClientOutputs();
|
|
|
|
void updateIcon();
|
|
|
|
void updateResourceName();
|
|
|
|
|
|
|
|
QString m_captionNormal;
|
|
|
|
QString m_captionSuffix;
|
2020-08-17 08:24:18 +00:00
|
|
|
bool m_isHidden = false;
|
2020-02-17 18:39:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|