This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit f640a093460e3056d2268ccb4b4fd0df8198c9ed
Author: Kim Woelders <[email protected]>
AuthorDate: Fri May 6 15:25:53 2022 +0200
moveresize: Fix screen edge resistance for grouped windows
Previously a window group being moved would not be affected by the
screen edge resistance.
Now the dragged window is subject to the screen edge resistance.
---
src/moveresize.c | 41 ++++++++++++++++++++++++++++++++---------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/moveresize.c b/src/moveresize.c
index 30f1cf36..419e3c4e 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -804,7 +804,8 @@ _MoveResizeMoveHandleMotion(void)
else
ndy = min_dy;
- for (i = 0; i < num; i++)
+ /* Loop over windows, top to bottom */
+ for (i = num - 1; i >= 0; i--)
{
ewin1 = gwins[i];
@@ -818,11 +819,22 @@ _MoveResizeMoveHandleMotion(void)
ewin1->shape_x == 0 ||
ewin1->shape_x + EoGetW(ewin1) == WinGetW(VROOT);
- if ((at_screen_edge && dd > Conf.snap.screen_snap_dist) ||
- (!at_screen_edge && dd > Conf.snap.edge_snap_dist))
+ if (at_screen_edge)
{
- jumpx = 1;
- ndx = ewin1->req_x - ewin1->shape_x + dx;
+ if (dd > Conf.snap.screen_snap_dist)
+ {
+ jumpx = 1;
+ ndx = ewin1->req_x - ewin1->shape_x + dx;
+ }
+ break;
+ }
+ else
+ {
+ if (dd > Conf.snap.edge_snap_dist)
+ {
+ jumpx = 1;
+ ndx = ewin1->req_x - ewin1->shape_x + dx;
+ }
}
}
@@ -836,11 +848,22 @@ _MoveResizeMoveHandleMotion(void)
ewin1->shape_y == 0 ||
ewin1->shape_y + EoGetH(ewin1) == WinGetH(VROOT);
- if ((at_screen_edge && dd > Conf.snap.screen_snap_dist) ||
- (!at_screen_edge && dd > Conf.snap.edge_snap_dist))
+ if (at_screen_edge)
{
- jumpy = 1;
- ndy = ewin1->req_y - ewin1->shape_y + dy;
+ if (dd > Conf.snap.screen_snap_dist)
+ {
+ jumpy = 1;
+ ndy = ewin1->req_y - ewin1->shape_y + dy;
+ }
+ break;
+ }
+ else
+ {
+ if (dd > Conf.snap.edge_snap_dist)
+ {
+ jumpy = 1;
+ ndy = ewin1->req_y - ewin1->shape_y + dy;
+ }
}
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.