exclude padding from snap delta of screen snap
using the actual delta this casewise causes false preference for window snapping (less to move) this restores the pre snap-to-content behavior in that regard and delta isn't used for anything else. BUG: 321325 FIXED-IN: 4.11 REVIEW: 111139
This commit is contained in:
parent
774e3ec05b
commit
725534471e
1 changed files with 4 additions and 4 deletions
|
@ -433,20 +433,20 @@ QPoint Workspace::adjustClientPosition(Client* c, QPoint pos, bool unrestricted,
|
||||||
padding[3] = 0;
|
padding[3] = 0;
|
||||||
|
|
||||||
if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snapX)) {
|
if ((sOWO ? (cx < xmin) : true) && (qAbs(xmin - cx) < snapX)) {
|
||||||
deltaX = xmin - (cx - padding[0]);
|
deltaX = xmin - cx;
|
||||||
nx = xmin - padding[0];
|
nx = xmin - padding[0];
|
||||||
}
|
}
|
||||||
if ((sOWO ? (rx > xmax) : true) && (qAbs(rx - xmax) < snapX) && (qAbs(xmax - rx) < deltaX)) {
|
if ((sOWO ? (rx > xmax) : true) && (qAbs(rx - xmax) < snapX) && (qAbs(xmax - rx) < deltaX)) {
|
||||||
deltaX = rx + padding[1] - xmax;
|
deltaX = rx - xmax;
|
||||||
nx = xmax - cw + padding[1];
|
nx = xmax - cw + padding[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sOWO ? (cy < ymin) : true) && (qAbs(ymin - cy) < snapY)) {
|
if ((sOWO ? (cy < ymin) : true) && (qAbs(ymin - cy) < snapY)) {
|
||||||
deltaY = ymin - (cy - padding[2]);
|
deltaY = ymin - cy;
|
||||||
ny = ymin - padding[2];
|
ny = ymin - padding[2];
|
||||||
}
|
}
|
||||||
if ((sOWO ? (ry > ymax) : true) && (qAbs(ry - ymax) < snapY) && (qAbs(ymax - ry) < deltaY)) {
|
if ((sOWO ? (ry > ymax) : true) && (qAbs(ry - ymax) < snapY) && (qAbs(ymax - ry) < deltaY)) {
|
||||||
deltaY = ry + padding[3] - ymax;
|
deltaY = ry - ymax;
|
||||||
ny = ymax - ch + padding[3];
|
ny = ymax - ch + padding[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue