diff --git a/src/effect/effectwindow.cpp b/src/effect/effectwindow.cpp index b8a8dff8cf..b66859d3ce 100644 --- a/src/effect/effectwindow.cpp +++ b/src/effect/effectwindow.cpp @@ -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(); diff --git a/src/effect/effectwindow.h b/src/effect/effectwindow.h index df36516fc3..de03a9df5a 100644 --- a/src/effect/effectwindow.h +++ b/src/effect/effectwindow.h @@ -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; /** diff --git a/src/plugins/backgroundcontrast/contrast.cpp b/src/plugins/backgroundcontrast/contrast.cpp index 20a04ceb8e..9330939c3c 100644 --- a/src/plugins/backgroundcontrast/contrast.cpp +++ b/src/plugins/backgroundcontrast/contrast.cpp @@ -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(); } } diff --git a/src/plugins/blur/blur.cpp b/src/plugins/blur/blur.cpp index fff1cabe81..96a9174130 100644 --- a/src/plugins/blur/blur.cpp +++ b/src/plugins/blur/blur.cpp @@ -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();