2021-02-04 09:07:20 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "item.h"
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2021-08-12 09:07:38 +00:00
|
|
|
class Deleted;
|
|
|
|
class Shadow;
|
2022-04-18 07:42:11 +00:00
|
|
|
class AbstractClient;
|
2021-08-12 09:07:38 +00:00
|
|
|
|
2021-02-04 09:07:20 +00:00
|
|
|
/**
|
|
|
|
* The ShadowItem class represents a nine-tile patch server-side drop-shadow.
|
|
|
|
*/
|
|
|
|
class KWIN_EXPORT ShadowItem : public Item
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-04-18 07:42:11 +00:00
|
|
|
explicit ShadowItem(Shadow *shadow, AbstractClient *window, Item *parent = nullptr);
|
2021-02-04 09:07:20 +00:00
|
|
|
~ShadowItem() override;
|
|
|
|
|
|
|
|
Shadow *shadow() const;
|
|
|
|
|
2021-05-21 10:51:23 +00:00
|
|
|
protected:
|
|
|
|
WindowQuadList buildQuads() const override;
|
|
|
|
|
2021-02-04 09:07:20 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void handleTextureChanged();
|
2021-06-10 10:02:10 +00:00
|
|
|
void updateGeometry();
|
2022-04-18 07:42:11 +00:00
|
|
|
void handleWindowClosed(AbstractClient *original, Deleted *deleted);
|
2021-02-04 09:07:20 +00:00
|
|
|
|
|
|
|
private:
|
2022-04-18 07:42:11 +00:00
|
|
|
AbstractClient *m_window;
|
2021-09-03 10:24:17 +00:00
|
|
|
Shadow *m_shadow = nullptr;
|
2021-02-04 09:07:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|