From 1e62fe99bde1fb5a4b6377688939266e028472f1 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 14 Jun 2022 10:10:01 +0100 Subject: [PATCH] Remove superfluous area check If area.contains(geometry.topLeft()) is false this does nothing anyway --- src/window.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index b2fe9d8540..d7ed456a60 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1523,13 +1523,11 @@ void Window::keepInArea(QRect area, bool partial) geometry.moveBottom(area.bottom()); } - if (!area.contains(geometry.topLeft())) { - if (geometry.left() < area.left()) { - geometry.moveLeft(area.left()); - } - if (geometry.top() < area.top()) { - geometry.moveTop(area.top()); - } + if (geometry.left() < area.left()) { + geometry.moveLeft(area.left()); + } + if (geometry.top() < area.top()) { + geometry.moveTop(area.top()); } if (moveResizeGeometry().topLeft() != geometry.topLeft()) {