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 4b488c98cb1d0370bc34ef1323dbba3fd6d55399
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Aug 12 01:34:22 2026 -0600

    wl_desktop_shell - leaving fullscreen has to travel the same road as entering
    
    xdg_toplevel.set_fullscreen does not put the client fullscreen. It records the
    zone, sends a configure saying fullscreen, and leaves the real work to the
    client: the ack turns into STATE_FULLSCREEN, and the commit after it is what
    finally calls e_client_fullscreen, over in _e_comp_wl_surface_state_commit.
    
    unset_fullscreen called e_client_unfullscreen() there and then, which begins
    `if (!ec->fullscreen) return;`. So a client that acked a fullscreen configure
    and had not yet committed a buffer for it - which is allowed, and is what a
    toolkit does while it works out its new size - asked to come back out and got
    nothing at all. No state change, because E had not applied one yet, and no
    configure either, because that direct call bypasses the configure entirely.
    The client is left believing it is fullscreen with nothing further to wait for.
    
    Send a configure instead and let the ack and commit apply it, exactly as the
    set side does. STATE_UNFULLSCREEN and its handler already exist and are what
    the pending state was built for. xdg5 has always done it this way - the size
    comes from ec->saved, the geometry E is about to restore the frame to, and
    that reads as 0x0 in precisely the case where E never went fullscreen and has
    nothing saved.
    
    wlcs: 717 passed -> 719, no regressions. Fixes
    XdgToplevel{Stable,V6}ConfigurationTest.window_can_unfullscreen_itself, and
    window_can_fullscreen_itself keeps passing on both - that is the direction this
    could have traded away.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/modules/wl_desktop_shell/xdg.c  | 6 +++++-
 src/modules/wl_desktop_shell/xdg6.c | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg.c b/src/modules/wl_desktop_shell/xdg.c
index c774f0eef..4df3e6c50 100644
--- a/src/modules/wl_desktop_shell/xdg.c
+++ b/src/modules/wl_desktop_shell/xdg.c
@@ -769,7 +769,11 @@ _e_xdg_toplevel_cb_fullscreen_unset(struct wl_client *client EINA_UNUSED, struct
    if (e_object_is_del(E_OBJECT(ec))) return;
 
    if (ec->lock_user_fullscreen) return;
-   e_client_unfullscreen(ec);
+   /* Mirror fullscreen_set: say so in a configure and let the client's ack
+    * and commit be what applies it, through STATE_UNFULLSCREEN. Calling
+    * e_client_unfullscreen() from here undoes a fullscreen that the commit
+    * path may not have applied yet, and then it does nothing at all. */
+   _xdg_shell_surface_send_configure(resource, 0, !!ec->maximized || ec->comp_data->max, 0, ec->saved.w, ec->saved.h);
 }
 
 static void
diff --git a/src/modules/wl_desktop_shell/xdg6.c b/src/modules/wl_desktop_shell/xdg6.c
index fa938a771..992264023 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -637,7 +637,11 @@ _e_xdg_toplevel_cb_fullscreen_unset(struct wl_client *client EINA_UNUSED, struct
    if (e_object_is_del(E_OBJECT(ec))) return;
 
    if (ec->lock_user_fullscreen) return;
-   e_client_unfullscreen(ec);
+   /* Mirror fullscreen_set: say so in a configure and let the client's ack
+    * and commit be what applies it, through STATE_UNFULLSCREEN. Calling
+    * e_client_unfullscreen() from here undoes a fullscreen that the commit
+    * path may not have applied yet, and then it does nothing at all. */
+   _xdg_shell_surface_send_configure(resource, 0, !!ec->maximized || ec->comp_data->max, 0, ec->saved.w, ec->saved.h);
 }
 
 static void

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

Reply via email to