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 3e25f46cf11ce0baba9e9da479fbee5b71efdcd8
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Aug 9 22:43:30 2026 -0600

    e_client - do not drag an off-screen popup back to its parent
    
    A window that has wandered off the screen is usually a client bug, and
    e_client_idler_before() recentres it on its parent so the user can reach
    it again. An xdg_popup hitting that path is not a lost window: it is a
    menu that was deliberately placed against a screen edge, exactly where
    its positioner said to put it.
    
    wlcs measures this. For "off top right edge" the positioner computes
    1019,-35 correctly, and by the time the pointer probes 1020,1 the popup
    has been moved to 789,235 - dead centre of its parent. Protocol-wise the
    popup's constraint_adjustment has already enumerated which liberties the
    compositor may take when the result does not fit; recentring is not one
    of them, and with ADJUSTMENT_NONE we may take none at all.
    
    Exempt E_WINDOW_TYPE_POPUP_MENU, which the four shell popup paths all set
    and which e_comp_object already treats as override-like.
    
    *XdgPopup*: 57 passed / 48 failed -> 64 passed / 41 failed.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/bin/e_client.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 23e2d9961..427c45b1c 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2563,7 +2563,17 @@ e_client_idler_before(void)
              ec->changes.visible = !evas_object_visible_get(ec->frame);
           }
 
+        /* A window that has wandered off the screen is usually a client bug,
+         * and dragging it back where the user can see it is the friendly
+         * thing to do. A popup menu is the exception: it sits where it was
+         * deliberately put, next to whatever spawned it. An xdg_popup in
+         * particular carries a positioner, and its constraint_adjustment has
+         * already spelled out which liberties we may take when the result
+         * does not fit on screen - recentring it on the parent is not one of
+         * them, and doing it anyway lands the popup nowhere near the menu
+         * item it belongs to. */
         if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) &&
+            (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU) &&
             (!E_INSIDE(ec->x, ec->y, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
             (!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, e_comp->w - 5, e_comp->h - 5))
             )

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

Reply via email to