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 6ef50358a0aa893fd4e6453277a9dd62cec4389b
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 10 20:17:31 2026 -0600

    e_comp_wl - tell a client the pointer moved when the surface did
    
    A surface that slides under a cursor that has not budged leaves the
    client believing the pointer is still wherever it last was. The position
    on the canvas really has not changed - the position within the surface
    has, and that is the one wl_pointer.motion carries.
    
    _e_comp_wl_pointer_focus_reeval() looks like it should already cover this:
    it feeds evas a mouse move at the pointer's current position. It cannot.
    Evas drops a mouse move whose position equals the previous one - the
    cur_pt/prev_pt guard around the MOUSE_MOVE callback in evas_events.c - so
    feeding the same coordinates delivers nothing at all, and the helper has
    been a no-op for every caller that did not also move the pointer.
    
    Nudging the pointer a pixel and back gets past the guard and does make the
    tests pass, at the price of telling the client the pointer visited a place
    it has never been. Send the one motion that is true instead, from the move
    callback, in the surface's new frame of reference.
    
    Interactive moves stay out of it: the pointer is driving those, and
    move_end already re-evaluates once the grab is over.
    
    wlcs: 640 passed -> 647, no regressions. Fixes
    surface_moves_while_under_pointer and subsurface_moves_under_input_device
    once/twice on wl_shell, xdg stable and xdg v6. The touch variants of the
    same three tests still fail - E keeps no touch point state to recompute
    from - and are handled separately.
---
 src/bin/e_comp_wl.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 65379544d..b9c2bea51 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -824,6 +824,30 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
                            ec->client.y + sec->comp_data->sub.data->position.y);
      }
    _e_comp_wl_surface_outputs_update(ec);
+
+   /* The surface moved under a cursor that never budged, so the pointer sits
+    * somewhere else in it now and the client has not been told. Nothing about
+    * the canvas position changed - the surface-local one did, and that is what
+    * wl_pointer.motion carries.
+    *
+    * Re-feeding evas at the unchanged canvas position is the obvious way to do
+    * this, and it does not work: evas drops a mouse move whose position equals
+    * the previous one, so no MOUSE_MOVE is ever delivered. Nudging the pointer
+    * a pixel and back does get past that, at the price of telling the client
+    * the pointer visited somewhere it has never been. Send the one motion that
+    * is true instead.
+    *
+    * An interactive move is the exception: the pointer is driving that one and
+    * move_end re-evaluates once the grab is over. */
+   if (ec->mouse.in && ec->comp_data->surface &&
+       (!e_client_action_get()) && (!e_client_util_ignored_get(ec)))
+     {
+        Evas_Coord px, py;
+
+        evas_pointer_canvas_xy_get(e_comp->evas, &px, &py);
+        _e_comp_wl_send_mouse_move(ec, px, py,
+                                   (unsigned int)lround(ecore_loop_time_get() * 1000));
+     }
 }
 
 static void
@@ -2956,11 +2980,22 @@ _e_comp_wl_client_cb_move_begin(void *data EINA_UNUSED, E_Client *ec EINA_UNUSED
 static void
 _e_comp_wl_pointer_focus_reeval(void)
 {
+   static Eina_Bool reevaluating = EINA_FALSE;
    Evas_Coord x, y;
 
    if ((!e_comp) || (!e_comp->evas)) return;
+
+   /* Delivering the move can move something else - a subsurface following its
+    * parent, a client reacting to the enter it just got - and land us back
+    * here. One pass settles it; the nested ones would only ask the same
+    * question at the same coordinates. */
+   if (reevaluating) return;
+   reevaluating = EINA_TRUE;
+
    evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
    evas_event_feed_mouse_move(e_comp->evas, x, y, 0, NULL);
+
+   reevaluating = EINA_FALSE;
 }
 
 /* The other half of e_comp_wl_pointer_focus_drop(). xdg-shell hedges here -

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

Reply via email to