29 WindowEffect = 1 << 4,
33 Q_DECLARE_FLAGS(Features, Feature)
35 QWindow *window()
const {
return qobject_cast<QWindow *>(parent()); }
39 void setEnabledNoTitlebar(
bool enable);
40 void setWindowRadius(
int windowRadius);
41 void setBorderWidth(
int borderWidth);
42 void setBorderColor(
const QColor &borderColor);
43 void setShadowRadius(
int shadowRadius);
44 void setShadowOffset(
const QPoint &shadowOffset);
45 void setShadowColor(
const QColor &shadowColor);
46 void setWindowEffect(DPlatformHandle::EffectScenes effectScene);
48 void setEnableBlurWindow(
bool enabled);
49 void setWindowBlurAreas(
const QVector<DPlatformHandle::WMBlurArea> &areas);
50 void setWindowBlurPaths(
const QList<QPainterPath> &paths);
51 bool enableBlurWindow()
const {
return m_blurWindowEnabled; }
53 bool isEnabledNoTitlebar()
const {
return m_noTitlebar; }
54 int windowRadius()
const {
return m_radius; }
55 int borderWidth()
const {
return m_borderWidth; }
56 QColor borderColor()
const {
return m_borderColor; }
57 int shadowRadius()
const {
return m_shadowRadius; }
58 QPoint shadowOffset()
const {
return m_shadowOffset; }
59 QColor shadowColor()
const {
return m_shadowColor; }
60 DPlatformHandle::EffectScenes windowEffect()
const {
return m_effectScene; }
63 void onActiveChanged();
64 void onSurfaceCreated();
65 void onSurfaceDestroyed();
69 bool eventFilter(QObject *watched, QEvent *event)
override;
70 void initWaylandWindow();
74 void updateFeature(T &member,
const T &value, Feature flag) {
79 void updateFeature(Feature flag) {
80 m_initialized |= flag;
88 static QMap<QWindow *, DTreeLandPlatformWindowHelper*> windowMap;
91 bool m_noTitlebar =
false;
92 bool m_blurWindowEnabled =
false;
95 int m_borderWidth = 0;
97 int m_shadowRadius = 0;
98 QPoint m_shadowOffset;
100 DPlatformHandle::EffectScenes m_effectScene = {};
101 Features m_initialized = {};
102 Features m_dirty = {};
103 bool m_applyScheduled =
false;
113 void setEnabled(
bool enabled)
override;
114 bool isEnabled()
const override;
116 bool isEnabledNoTitlebar()
const override;
117 bool setEnabledNoTitlebar(
bool enable)
override;
119 int windowRadius()
const override;
120 void setWindowRadius(
int windowRadius)
override;
122 int borderWidth()
const override;
123 void setBorderWidth(
int borderWidth)
override;
124 QColor borderColor()
const override;
125 void setBorderColor(
const QColor &borderColor)
override;
126 int shadowRadius()
const override;
127 void setShadowRadius(
int shadowRadius)
override;
128 QPoint shadowOffset()
const override;
129 void setShadowOffset(
const QPoint &shadowOffset)
override;
130 QColor shadowColor()
const override;
131 void setShadowColor(
const QColor &shadowColor)
override;
133 bool enableBlurWindow()
const override;
134 void setEnableBlurWindow(
bool enableBlurWindow)
override;
136 DPlatformHandle::EffectScene windowEffect()
override;
137 void setWindowEffect(DPlatformHandle::EffectScenes effectScene)
override;
139 void setWindowBlurAreas(
const QVector<DPlatformHandle::WMBlurArea> &areas);
140 void setWindowBlurPaths(
const QList<QPainterPath> &paths);
Definition treelanddecorationclientextension.h:41