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:
|
2023-09-13 17:59:29 +00:00
|
|
|
WaylandWindow(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-08-29 13:54:28 +00:00
|
|
|
QRectF resizeWithChecks(const QRectF &geometry, const QSizeF &size) override;
|
2020-02-17 18:39:17 +00:00
|
|
|
void killWindow() override;
|
2022-10-21 14:24:42 +00:00
|
|
|
QString windowRole() const 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-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;
|
2023-08-02 12:05:20 +00:00
|
|
|
void updateClientOutputs();
|
2024-03-06 18:05:46 +00:00
|
|
|
std::unique_ptr<WindowItem> createItem(Item *parentItem) 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);
|
2023-03-02 15:02:09 +00:00
|
|
|
void markAsMapped();
|
2020-08-18 12:51:20 +00:00
|
|
|
|
2020-02-17 18:39:17 +00:00
|
|
|
private:
|
|
|
|
void updateIcon();
|
|
|
|
void updateResourceName();
|
|
|
|
|
|
|
|
QString m_captionNormal;
|
|
|
|
QString m_captionSuffix;
|
2023-03-21 08:53:21 +00:00
|
|
|
bool m_isScreenLocker = false;
|
2020-02-17 18:39:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|