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 1e4bfeb3c6baed0ecdcf9dbb47acd4d309e24f1c
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 11 16:42:02 2026 -0600

    e_comp_wl - do not unconstrain every other client when one is deleted
    
    e_comp_wl_extension_pointer_unconstrain() takes an E_Client and means one
    of two different things by it. With a client, it is the delete path and
    only that client's constraints should go. With NULL it is
    e_comp_grab_input() taking an input grab, where dropping every constraint
    in the compositor is the point.
    
    It did the second in both cases: the global sweep over active_constraints
    ran unconditionally, after the per-client list had already been handled.
    So destroying any window at all unlocked every other client's pointer, and
    sent them unlocked/unconfined saying so. A game or a browser holding
    pointer lock lost it the moment an unrelated window closed anywhere on the
    desktop, and had no way to tell that from the compositor legitimately
    taking the lock away.
    
    Also stop announcing the release of a constraint that never activated:
    send unlocked/unconfined only where locked/confined went out.
    
    wlcs PointerConstraints+RelativePointer: 14 passed -> 16. The two that turn
    green are the persistent-reselect pair, which destroy a surface in a loop
    and expect the constraint on the *other* surface to survive it.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Claude-Session: https://claude.ai/code/session_01W6z4GbxmqypzCzUHPwzFMd
---
 src/bin/e_comp_wl_extensions.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/bin/e_comp_wl_extensions.c b/src/bin/e_comp_wl_extensions.c
index ec1099276..24ba610f7 100644
--- a/src/bin/e_comp_wl_extensions.c
+++ b/src/bin/e_comp_wl_extensions.c
@@ -1323,18 +1323,28 @@ e_comp_wl_extension_pointer_unconstrain(E_Client *ec)
 
    if (ec)
      {
-        /* deleting client */
+        /* deleting client: only its own constraints go. The global sweep
+         * below used to run in this case too, so destroying any window at all
+         * silently unlocked every other client's pointer - and told them so,
+         * out of nowhere. */
         EINA_LIST_FREE(ec->comp_data->constraints, c)
           {
-             c->active = EINA_FALSE;
-             if (c->lock)
-               zwp_locked_pointer_v1_send_unlocked(c->res);
-             else
-               zwp_confined_pointer_v1_send_unconfined(c->res);
-             active_constraints = eina_list_remove(active_constraints, c);
+             /* a constraint that never activated has nothing to take back */
+             if (c->active)
+               {
+                  c->active = EINA_FALSE;
+                  if (c->lock)
+                    zwp_locked_pointer_v1_send_unlocked(c->res);
+                  else
+                    zwp_confined_pointer_v1_send_unconfined(c->res);
+                  active_constraints = eina_list_remove(active_constraints, c);
+               }
              c->ec = NULL;
           }
+        return;
      }
+
+   /* no client: an input grab is being taken, everything is dropped */
    EINA_LIST_FREE(active_constraints, c)
      {
         c->active = EINA_FALSE;

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

Reply via email to