This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch wl/browser-all
in repository enlightenment.
View the commit online.
commit ac3efaaa7eda307a8aafad2c8044686807b3e986
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 11 16:45:23 2026 -0600
e_comp_wl - keep a diagonally clamped pointer inside the confine region
When a confined pointer is pushed out of its region, _inside_tiler() works
out where to put it back by intersecting the motion vector with the edge
it crossed. It solves for one axis - the one whose coordinate left the
rect - and computes the other from the slope. On a diagonal that second
coordinate can land past the far edge: a 300px surface, a pointer at
150,150 pushed to -450,750, and the answer is 0,300 - x correctly clamped,
y one past the last row it is allowed to occupy.
The pointer is then warped there, i.e. exactly where the constraint has
just decided it may not be, and only the motion event generated by that
warp drags it back in - to 1,299, which is not the edge either. Clamp both
coordinates to the rect instead.
Measured on its own: no change, 17 passed either way. The test that shows
it, confined_pointer_movement_is_constrained, cannot get past its first
assertion until the harness can express a relative motion - next commit.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01W6z4GbxmqypzCzUHPwzFMd
---
src/bin/e_comp_wl_extensions.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/bin/e_comp_wl_extensions.c b/src/bin/e_comp_wl_extensions.c
index e2a83308d..871d69ca4 100644
--- a/src/bin/e_comp_wl_extensions.c
+++ b/src/bin/e_comp_wl_extensions.c
@@ -1307,6 +1307,13 @@ _inside_tiler(Eina_Tiler *r, Eina_Bool active, int x, int y, int px, int py, int
else
*ax = lround(((double)(x - px) / (y - py)) * (*ay - y)) + x;
}
+ /* Only one axis is solved for above; on a diagonal the other one is
+ * wherever the motion vector crosses, which can be past the far edge.
+ * Held-at-the-edge has to mean inside the rect on both axes, or the
+ * warp puts the pointer where the constraint just said it may not go
+ * and the next motion event has to drag it back in. */
+ *ax = E_CLAMP(*ax, prect.x, prect.x + prect.w - 1);
+ *ay = E_CLAMP(*ay, prect.y, prect.y + prect.h - 1);
}
return ret;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.