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 4fbbe3d07c78731af704cb3a4aecf76e30ab22fd
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 10 09:49:46 2026 -0600
tests - route a synthesised click through the manager, not just the canvas
wl_test fed clicks straight into evas, on the reasoning that E's wayland
input handlers are evas callbacks on the client's frame. True as far as
clients go, and false for the compositor: a real session routes a button
through ecore first, and that is the half where E dismisses an
xdg_popup grab. Click outside a grabbing popup and the handler swallows
the event entirely - it never reaches a client at all.
So no test could ever dismiss a grab by clicking, and the gap was silent:
the click simply landed on whatever was underneath and the popup stayed
up, which reads like a compositor bug rather than a missing half of the
harness. Two wlcs tests were failing on it with E's own dismissal logic
already correct.
Order matters as much as the call. The handler asks
e_client_focused_get() whether the grab holder still has focus, so it has
to run before the evas feed moves focus to whatever was clicked, and it
has to be able to swallow the event the way the real path does.
Coordinates come from the last warp: an ecore button event carries them
the way libinput would, and the evas feed does not.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
src/modules/wl_test/e_mod_main.c | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/modules/wl_test/e_mod_main.c b/src/modules/wl_test/e_mod_main.c
index b590f4158..792b72e88 100644
--- a/src/modules/wl_test/e_mod_main.c
+++ b/src/modules/wl_test/e_mod_main.c
@@ -124,12 +124,20 @@ _wl_test_cb_zone_add(struct wl_client *client EINA_UNUSED, struct wl_resource *r
ERR("wl_test: could not create wl_output for zone %d", num);
}
+/* Where the synthesised pointer is. E's manager-level input handlers are fed
+ * ecore events, which carry coordinates the way libinput would; the evas feed
+ * below does not, so remember them here. */
+static int _pointer_x = 0, _pointer_y = 0;
+
static void
_wl_test_cb_pointer_warp(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t x, int32_t y)
{
- /* Feeding evas is enough: E's wayland pointer handlers are evas callbacks
- * on the client's frame object, so a synthesised evas event reaches the
- * client exactly as a real one would. No uinput, no libinput, no seat. */
+ /* Feeding evas delivers to the client: E's wayland pointer handlers are
+ * evas callbacks on the client's frame object, so a synthesised evas event
+ * reaches the client exactly as a real one would. No uinput, no libinput,
+ * no seat. It is not the whole story for buttons - see below. */
+ _pointer_x = x;
+ _pointer_y = y;
evas_event_feed_mouse_move(e_comp->evas, x, y, 0, NULL);
}
@@ -138,6 +146,7 @@ _wl_test_cb_pointer_button(struct wl_client *client EINA_UNUSED, struct wl_resou
{
/* evas buttons are 1-based; the protocol speaks BTN_* like the seat. */
int b = 1;
+ Ecore_Event_Mouse_Button ev;
switch (button)
{
@@ -147,6 +156,23 @@ _wl_test_cb_pointer_button(struct wl_client *client EINA_UNUSED, struct wl_resou
default: b = (int)(button - BTN_LEFT) + 1; break;
}
+ /* A real session routes a button through ecore before the canvas ever sees
+ * it, and E dismisses an xdg_popup grab from that half - a click outside a
+ * grabbing popup is swallowed there and never reaches a client at all.
+ * Feeding only evas skips it, so a grab could never be dismissed by a
+ * click under test, and the miss is invisible: the click simply lands on
+ * whatever is underneath and the popup stays up.
+ *
+ * Order matters as much as the call does. The handler asks
+ * e_client_focused_get() whether the grab holder is focused, so it has to
+ * run before the evas feed moves focus to whatever was clicked. */
+ memset(&ev, 0, sizeof(ev));
+ ev.x = ev.root.x = _pointer_x;
+ ev.y = ev.root.y = _pointer_y;
+ ev.buttons = b;
+ ev.multi.device = 0;
+ if (e_comp_wl_grab_client_mouse_button(&ev) == ECORE_CALLBACK_DONE) return;
+
if (pressed)
evas_event_feed_mouse_down(e_comp->evas, b, EVAS_BUTTON_NONE, 0, NULL);
else
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.