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 4979af02975ed2355d255a2b72084a6880d92666
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Aug 9 15:45:28 2026 -0600

    tests - wlcs passes touch coordinates as pixels, not wl_fixed
    
    <wlcs/touch.h> declares
    
        void (*touch_down)(WlcsTouch* touch, wl_fixed_t x, wl_fixed_t y);
    
    and wlcs::Touch::down_at(int x, int y) then calls
    
        touch->touch_down(touch.get(), x, y);
    
    with no wl_fixed_from_int. Pointer::move_to does convert, so the two input
    paths disagree and only the pointer one matches the header.
    
    This shim believed the header, so every touch was divided by 256. A touch
    meant for (64, 7) went to (0, 0), landed on no surface, and the test failed
    for a reason that had nothing to do with the compositor:
    
        -> [email protected]_down(1, 0, 0)      with the surface at 64,7
    
    That is what every touch result measured. It also hid the two real E bugs
    underneath it - the reserved device id and the mouse.in gate - both of which
    were found, fixed, and moved exactly zero tests, because the coordinates
    were wrong the whole time.
    
    AllSurfaceTypes/TouchTest: 6 passed 18 failed -> 18 passed 6 failed.
    
    True in v1.7.0 and still true at 933bc61. If wlcs ever starts converting,
    this fails loudly rather than silently - the coordinates would be 256x too
    small and the touch tests would go straight back to failing.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/tests/wlcs/e_wlcs.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/tests/wlcs/e_wlcs.c b/src/tests/wlcs/e_wlcs.c
index cbc40e1f4..adda96bf7 100644
--- a/src/tests/wlcs/e_wlcs.c
+++ b/src/tests/wlcs/e_wlcs.c
@@ -594,6 +594,28 @@ _server_create_pointer(WlcsDisplayServer *server)
  * which non-zero number this is does not matter to it. */
 #define E_WLCS_TOUCH_ID 1
 
+/* The coordinates are NOT wl_fixed_t, whatever <wlcs/touch.h> declares:
+ *
+ *   void (*touch_down)(WlcsTouch* touch, wl_fixed_t x, wl_fixed_t y);
+ *
+ * wlcs::Touch::down_at(int x, int y) in src/in_process_server.cpp calls
+ *
+ *   touch->touch_down(touch.get(), x, y);
+ *
+ * with no wl_fixed_from_int, so a plain pixel count arrives. The pointer
+ * equivalent, Pointer::move_to, *does* convert - the two disagree, and only
+ * the pointer one matches the header.
+ *
+ * Believing the header costs a factor of 256: a touch meant for (64, 7) is
+ * delivered at (0, 0), lands on no surface, and every touch test fails for a
+ * reason that has nothing to do with the compositor. That is what was
+ * happening here, and it hid two genuine E bugs behind it - the mouse.in gate
+ * and the reserved device id - both of which were fixed without moving a
+ * single wlcs test, because the coordinates were wrong the whole time.
+ *
+ * True in v1.7.0 and still true at 933bc61. If wlcs ever starts converting,
+ * this breaks loudly rather than silently: coordinates would be 256x too
+ * small and every touch test would fail again. */
 static void
 _touch_down(WlcsTouch *touch, wl_fixed_t x, wl_fixed_t y)
 {
@@ -601,7 +623,7 @@ _touch_down(WlcsTouch *touch, wl_fixed_t x, wl_fixed_t y)
 
    if (!t->server->ctrl_test) return;
    wl_test_touch_down(t->server->ctrl_test, E_WLCS_TOUCH_ID,
-                      wl_fixed_to_int(x), wl_fixed_to_int(y));
+                      (int32_t)x, (int32_t)y);
    wl_display_roundtrip(t->server->ctrl);
 }
 
@@ -612,7 +634,7 @@ _touch_move(WlcsTouch *touch, wl_fixed_t x, wl_fixed_t y)
 
    if (!t->server->ctrl_test) return;
    wl_test_touch_move(t->server->ctrl_test, E_WLCS_TOUCH_ID,
-                      wl_fixed_to_int(x), wl_fixed_to_int(y));
+                      (int32_t)x, (int32_t)y);
    wl_display_roundtrip(t->server->ctrl);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to