This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch wl/tests-wlcs
in repository enlightenment.

View the commit online.

commit 507fed5812c149f62387d31196718ba8d3158aaf
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Aug 8 19:05:53 2026 -0600

    wl_test - add touch injection
    
    wlcs requires a create_touch hook, and E's touch path was otherwise
    unreachable from a test.
    
    E turns evas multi events into wl_touch and uses the evas device number as
    the touch id (_e_comp_wl_evas_cb_multi_down), so touch injection is the
    same trick as the pointer: feed evas and let E's existing handlers carry
    it out to the client. The zeroed radius, pressure and angle arguments are
    what a plain touchscreen with no extra axes reports.
    
    Single touch point per id, which is what the conformance suite drives.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/modules/wl_test/e_mod_main.c | 28 ++++++++++++++++++++++++++++
 src/protocol/wl-test.xml         | 23 +++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/src/modules/wl_test/e_mod_main.c b/src/modules/wl_test/e_mod_main.c
index 1acc2d3b4..b590f4158 100644
--- a/src/modules/wl_test/e_mod_main.c
+++ b/src/modules/wl_test/e_mod_main.c
@@ -159,6 +159,31 @@ _wl_test_cb_pointer_axis(struct wl_client *client EINA_UNUSED, struct wl_resourc
    evas_event_feed_mouse_wheel(e_comp->evas, direction ? 1 : 0, steps, 0, NULL);
 }
 
+/* E turns evas multi events into wl_touch and uses the evas device number as
+ * the touch id (_e_comp_wl_evas_cb_multi_down). The zeroed radius, pressure
+ * and angle arguments are what a plain touchscreen with no extra axes
+ * reports. */
+static void
+_wl_test_cb_touch_down(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t id, int32_t x, int32_t y)
+{
+   evas_event_feed_multi_down(e_comp->evas, id, x, y, 0, 0, 0, 0, 0, 0, 0,
+                              EVAS_BUTTON_NONE, 0, NULL);
+}
+
+static void
+_wl_test_cb_touch_move(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t id, int32_t x, int32_t y)
+{
+   evas_event_feed_multi_move(e_comp->evas, id, x, y, 0, 0, 0, 0, 0, 0, 0,
+                              0, NULL);
+}
+
+static void
+_wl_test_cb_touch_up(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t id)
+{
+   evas_event_feed_multi_up(e_comp->evas, id, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                            EVAS_BUTTON_NONE, 0, NULL);
+}
+
 static void
 _wl_test_cb_key(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, const char *keyname, uint32_t pressed)
 {
@@ -200,6 +225,9 @@ static const struct wl_test_interface _wl_test_implementation =
    _wl_test_cb_pointer_warp,
    _wl_test_cb_pointer_button,
    _wl_test_cb_pointer_axis,
+   _wl_test_cb_touch_down,
+   _wl_test_cb_touch_move,
+   _wl_test_cb_touch_up,
    _wl_test_cb_key,
    _wl_test_cb_sync,
 };
diff --git a/src/protocol/wl-test.xml b/src/protocol/wl-test.xml
index e373aa299..c95343c61 100644
--- a/src/protocol/wl-test.xml
+++ b/src/protocol/wl-test.xml
@@ -148,6 +148,29 @@
       <arg name="steps" type="int" summary="detents; negative scrolls back"/>
     </request>
 
+    <request name="touch_down">
+      <description summary="put a touch point down">
+        Single-touch is enough for what the conformance suite drives. The id
+        maps to the evas multi-touch device number, which is what E forwards
+        as the wl_touch id.
+      </description>
+      <arg name="id" type="int"/>
+      <arg name="x" type="int"/>
+      <arg name="y" type="int"/>
+    </request>
+
+    <request name="touch_move">
+      <description summary="move a touch point"/>
+      <arg name="id" type="int"/>
+      <arg name="x" type="int"/>
+      <arg name="y" type="int"/>
+    </request>
+
+    <request name="touch_up">
+      <description summary="lift a touch point"/>
+      <arg name="id" type="int"/>
+    </request>
+
     <request name="key">
       <description summary="press or release a key by keysym name">
         Named rather than by keycode so a test does not have to reproduce the

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

Reply via email to