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 1631cc0452fdb277e270a2110196ff4bcdacb464
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 18 19:22:27 2026 -0600
e_client - e_client_has_xwindow(NULL) is FALSE, not a crash
The predicate read ec->pixmap with no NULL check, and several callers ask
it of a pointer that is routinely NULL:
* e_comp_wl->drag_client, whenever a drag was started without an icon
surface - and wl_data_device.start_drag takes a nullable icon, so a
client that draws its own drag feedback, or none at all, is doing
nothing unusual;
* e_comp_wl->ptr.ec, whenever the pointer is over nothing.
Between them that is four call sites: two in
e_comp_wl_data_device_send_enter, one in e_dnd.c and one in the xwayland
module. The first pointer enter after an iconless drag went through
send_enter and took the compositor down with every window on it.
Found by the first Wayland drag this test suite has ever started, which
took two other things to become possible: the harness only began
delivering ecore input this session, and start_drag is silently ignored
unless the origin surface holds keyboard focus, so a test that maps its
windows in the wrong order never starts a drag at all.
Answering in the predicate rather than at each call site, because "no
client" has a correct answer here and four places should not each have to
remember it.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
src/bin/e_client.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 1206e8021..f2603949f 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -5853,6 +5853,21 @@ e_client_is_stacking(const E_Client *ec)
E_API Eina_Bool
e_client_has_xwindow(const E_Client *ec)
{
+ /* No client has no X window. Several callers ask this of a pointer that is
+ * routinely NULL - e_comp_wl->drag_client whenever a drag was started
+ * without an icon surface, and e_comp_wl->ptr.ec whenever the pointer is
+ * over nothing - and every one of them was reading ec->pixmap through it.
+ *
+ * wl_data_device.start_drag takes a nullable icon, so a client that draws
+ * its own drag feedback, or none, is doing nothing unusual: it just never
+ * gave E a drag_client. The first pointer enter after that went through
+ * e_comp_wl_data_device_send_enter and took the compositor down with every
+ * window on it. Found by the first Wayland drag this test suite ever
+ * started; the same NULL reaches three other call sites in e_dnd.c and the
+ * xwayland module, so the answer belongs here rather than at each of
+ * them. */
+ if (!ec) return EINA_FALSE;
+
#ifdef HAVE_WAYLAND_ONLY
(void)ec;
return EINA_FALSE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.