window: don't use exact comparison for QRectFs
With fractional geometries, we can only guarantee that nextMoveResizeGeom eventually is within one unit of currentMoveResizeGeom. BUG: 479786 FIXED-IN: 6.0
This commit is contained in:
parent
e963ae09cc
commit
2dba3d30af
1 changed files with 5 additions and 1 deletions
|
@ -1736,7 +1736,11 @@ void Window::handleInteractiveMoveResize(qreal x, qreal y, qreal x_root, qreal y
|
|||
currentTry.translate(dx, dy);
|
||||
nextMoveResizeGeom = currentTry;
|
||||
|
||||
if (nextMoveResizeGeom == currentMoveResizeGeom) {
|
||||
// sinces nextMoveResizeGeom is fractional, at best it is within 1 unit of currentMoveResizeGeom
|
||||
if (std::abs(currentMoveResizeGeom.left() - nextMoveResizeGeom.left()) <= 1.0
|
||||
&& std::abs(currentMoveResizeGeom.right() - nextMoveResizeGeom.right()) <= 1.0
|
||||
&& std::abs(currentMoveResizeGeom.top() - nextMoveResizeGeom.top()) <= 1.0
|
||||
&& std::abs(currentMoveResizeGeom.bottom() - nextMoveResizeGeom.bottom()) <= 1.0) {
|
||||
break; // Prevent lockup
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue