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 853331620f69aba13b0b2766645340f278b2d975
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Aug 16 11:35:01 2026 -0600

    e_comp_wl - do not send wl_pointer.motion to a surface we never entered
    
    wl_pointer.motion carries surface-local coordinates, so it only means anything
    to a client that has been told the pointer is on one of its surfaces. Sent
    without a preceding enter it is a protocol violation, and the client cannot
    place the pointer at all - it has no surface to read the coordinates against.
    wlcs says so in as many words, from its own pointer listener:
    
      "Got wl_pointer.motion when the pointer was not on a surface"
    
    An interactive move or resize drops the pointer focus on purpose - xdg-shell
    says the surface loses the device used for the grab, and that is deliberate.
    Handing it back at the end goes through _e_comp_wl_pointer_focus_reeval(),
    which feeds a synthetic move at the position the pointer is already at; evas
    discards a move that does not move, so the enter never goes out. The next
    real motion then arrives with nothing before it.
    
    Close it where the motion is sent, rather than making the hand-back at grab
    end cleverer. This is the point at which the pointer is known to be over the
    client, because we are about to tell it so, and it covers every other way the
    focus might have been dropped without a matching enter rather than just this
    one. _e_comp_wl_mouse_in() already declines to send a second enter with no
    leave between, so the usual path where focus was never lost is unaffected.
    
    Measured: both surface_can_be_resized_interactively tests go from failing to
    passing with the resize fix before this one; full suite 754 -> 756 passed,
    15 -> 13 failed, and the failure set loses exactly those two and nothing else.
    
    Still failing, and deliberately not addressed here:
    XdgToplevelV6Test.surface_can_be_moved_interactively and
    touch_can_not_steal_pointer_based_move. Both want the button release
    delivered to a surface whose focus was dropped at grab start, which the
    protocol text says should have been dropped - check what Mir actually does
    before deciding whether that is our bug or the suite encoding its own
    compositor.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/bin/e_comp_wl.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 28e96a6ff..52938a1f7 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -474,6 +474,32 @@ _e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp)
         e_client_mouse_move(ec, &(Evas_Point){x, y});
      }
    /* end hacks */
+
+   /* wl_pointer.motion only means anything to a client that has been told the
+    * pointer is on one of its surfaces - the coordinates are surface-local,
+    * and with no preceding enter there is no surface to read them against.
+    *
+    * An interactive move or resize drops that focus on purpose, because
+    * xdg-shell says the surface loses the device used for the grab. Handing
+    * it back at the end goes through _e_comp_wl_pointer_focus_reeval(), which
+    * feeds a synthetic move at the position the pointer is already at - and
+    * evas discards a move that does not move, so the enter never goes out.
+    * The next real motion then arrives with no enter before it. That is a
+    * protocol violation, and it leaves the client unable to say where the
+    * pointer is at all.
+    *
+    * Rather than make the hand-back at grab end cleverer, close it here,
+    * where the pointer is known to be over this client because we are on the
+    * point of telling it so. _e_comp_wl_mouse_in() already declines to send a
+    * second enter with no leave between, so this costs nothing on the usual
+    * path where the focus was never dropped. */
+   if (e_comp_wl->ptr.ec != ec)
+     {
+        Evas_Event_Mouse_In ein;
+
+        _e_comp_wl_mouse_in(ec, &ein);
+     }
+
    wc = wl_resource_get_client(ec->comp_data->surface);
    EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {

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

Reply via email to