From 250d271b2655a91f0cc152c4d799dfd2302067f1 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 8 Sep 2022 13:05:14 +0200 Subject: [PATCH] Add WindowQuad::bounds() as a convenience method to get a QRectF from it --- src/libkwineffects/kwineffects.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index fa4be72e4d..8929a6ab4a 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -2930,6 +2930,7 @@ public: double right() const; double top() const; double bottom() const; + QRectF bounds() const; private: friend class WindowQuadList; @@ -4091,6 +4092,11 @@ inline double WindowQuad::bottom() const return qMax(verts[0].py, qMax(verts[1].py, qMax(verts[2].py, verts[3].py))); } +inline QRectF WindowQuad::bounds() const +{ + return QRectF(QPointF(left(), top()), QPointF(right(), bottom())); +} + /*************************************************************** Motion ***************************************************************/