effect/effectwindow: remove decorationInnerRect
It's the same as contentsRect
This commit is contained in:
parent
1fbb742698
commit
8542c20030
4 changed files with 5 additions and 21 deletions
|
@ -344,11 +344,6 @@ QSizeF EffectWindow::basicUnit() const
|
|||
return QSize(1, 1);
|
||||
}
|
||||
|
||||
QRectF EffectWindow::decorationInnerRect() const
|
||||
{
|
||||
return d->m_window->rect() - d->m_window->frameMargins();
|
||||
}
|
||||
|
||||
KDecoration2::Decoration *EffectWindow::decoration() const
|
||||
{
|
||||
return d->m_window->decoration();
|
||||
|
|
|
@ -222,11 +222,6 @@ class KWIN_EXPORT EffectWindow : public QObject
|
|||
* Geometry of the actual window contents inside the whole (including decorations) window.
|
||||
*/
|
||||
Q_PROPERTY(QRectF contentsRect READ contentsRect)
|
||||
/**
|
||||
* Geometry of the transparent rect in the decoration.
|
||||
* May be different from contentsRect if the decoration is extended into the client area.
|
||||
*/
|
||||
Q_PROPERTY(QRectF decorationInnerRect READ decorationInnerRect)
|
||||
Q_PROPERTY(bool hasDecoration READ hasDecoration)
|
||||
Q_PROPERTY(QStringList activities READ activities)
|
||||
Q_PROPERTY(bool onCurrentActivity READ isOnCurrentActivity)
|
||||
|
@ -423,12 +418,6 @@ public:
|
|||
* Geometry of the actual window contents inside the whole (including decorations) window.
|
||||
*/
|
||||
QRectF contentsRect() const;
|
||||
/**
|
||||
* Geometry of the transparent rect in the decoration.
|
||||
* May be different from contentsRect() if the decoration is extended into the client area.
|
||||
* @since 4.5
|
||||
*/
|
||||
QRectF decorationInnerRect() const;
|
||||
bool hasDecoration() const;
|
||||
bool decorationHasAlpha() const;
|
||||
/**
|
||||
|
|
|
@ -305,11 +305,11 @@ QRegion ContrastEffect::contrastRegion(const EffectWindow *w) const
|
|||
if (const auto it = m_windowData.find(w); it != m_windowData.end()) {
|
||||
const QRegion &appRegion = it->second.contrastRegion;
|
||||
if (!appRegion.isEmpty()) {
|
||||
region += appRegion.translated(w->contentsRect().topLeft().toPoint()) & w->decorationInnerRect().toRect();
|
||||
region += appRegion.translated(w->contentsRect().topLeft().toPoint()) & w->contentsRect().toRect();
|
||||
} else {
|
||||
// An empty region means that the blur effect should be enabled
|
||||
// An empty region means that the contrast effect should be enabled
|
||||
// for the whole window.
|
||||
region = w->decorationInnerRect().toRect();
|
||||
region = w->contentsRect().toRect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ QRegion BlurEffect::decorationBlurRegion(const EffectWindow *w) const
|
|||
return QRegion();
|
||||
}
|
||||
|
||||
QRegion decorationRegion = QRegion(w->decoration()->rect()) - w->decorationInnerRect().toRect();
|
||||
QRegion decorationRegion = QRegion(w->decoration()->rect()) - w->contentsRect().toRect();
|
||||
//! we return only blurred regions that belong to decoration region
|
||||
return decorationRegion.intersected(w->decoration()->blurRegion());
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ QRegion BlurEffect::blurRegion(EffectWindow *w) const
|
|||
// for the whole window.
|
||||
region = w->contentsRect().toRect();
|
||||
} else {
|
||||
region = content->translated(w->contentsRect().topLeft().toPoint()) & w->decorationInnerRect().toRect();
|
||||
region = content->translated(w->contentsRect().topLeft().toPoint()) & w->contentsRect().toRect();
|
||||
}
|
||||
if (frame.has_value()) {
|
||||
region += frame.value();
|
||||
|
|
Loading…
Reference in a new issue