From c9b41a1682b3f49054e177c6daff5cbddef341bc Mon Sep 17 00:00:00 2001 From: Andrey Butirsky Date: Tue, 5 Oct 2021 15:32:36 +0300 Subject: [PATCH] fix wrong approach geometry of screen edge's effect Edge geometry has width and height, so we need the correction for approach geometry of bottom and right corners. The other edges are fixed as well. BUG: 442973 --- src/screenedge.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/screenedge.cpp b/src/screenedge.cpp index c971a146d6..32f6f67851 100644 --- a/src/screenedge.cpp +++ b/src/screenedge.cpp @@ -487,35 +487,35 @@ void Edge::setGeometry(const QRect &geometry) int y = m_geometry.y(); int width = m_geometry.width(); int height = m_geometry.height(); - const int size = m_edges->cornerOffset(); + const int offset = m_edges->cornerOffset(); if (isCorner()) { if (isRight()) { - x = x - size +1; + x = x + width - offset; } if (isBottom()) { - y = y - size +1; + y = y + height - offset; } - width = size; - height = size; + width = offset; + height = offset; } else { if (isLeft()) { - y += size + 1; - width = size; - height = height - size * 2; + y += offset; + width = offset; + height = height - offset * 2; } else if (isRight()) { - x = x - size + 1; - y += size; - width = size; - height = height - size * 2; + x = x + width - offset; + y += offset; + width = offset; + height = height - offset * 2; } else if (isTop()) { - x += size; - width = width - size * 2; - height = size; + x += offset; + width = width - offset * 2; + height = offset; } else if (isBottom()) { - x += size; - y = y - size +1; - width = width - size * 2; - height = size; + x += offset; + y = y + height - offset; + width = width - offset * 2; + height = offset; } } m_approachGeometry = QRect(x, y, width, height);