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 79d8ca06b8436930babe977127e39c4575d5b308
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 11 23:30:45 2026 -0600

    e_comp_wl - a size in a configure is an instruction, not an echo
    
    xdg-shell keeps 0x0 in a configure for "be whatever size you like", so any
    other number is the compositor telling the client how big to be. E filled
    one in whenever it had one to hand: _e_comp_wl_configure_send() took
    ec->client.w/h as soon as the pixmap was usable, whatever the configure was
    actually for. A configure sent purely to carry a state change - focus is
    the one every client meets, on its first map - therefore handed the client
    back the size the client itself had just chosen, dressed as an instruction
    to stay that size.
    
    Which site is imposing a geometry cannot be worked out from ec->changes.size
    inside the helper, tempting as that looks. _e_client_eval clears changes.size
    before it calls evas_object_resize, so by the time "client_resize" reaches us
    the flag is already gone and that path genuinely does depend on the
    pixmap-usable clause this takes away. Mark the intent at the call instead:
    the four sites that drive a geometry - maximise, unmaximise, client_resize,
    fullscreen - ask for a size, and the three that only carry state - the
    configure owed on commit, focus in, focus out - do not.
    
    wlcs: 716 passed -> 718, no regressions. Fixes
    XdgToplevel{Stable,V6}ConfigurationTest.defaults, and leaves
    window_can_maximize_itself and window_can_fullscreen_itself passing - those
    assert a non-zero size and cover the direction this could have traded away.
    
    window_can_unfullscreen_itself failed before and still fails, but its symptom
    moves from an activated=false to a timeout: the configure it used to see was
    riding along on a size change that no longer happens. Nothing in e_comp_wl
    handles the "unfullscreen" smart callback e_client_unfullscreen emits, so
    that edge sends no configure of its own. Separate bug, looked at next.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/bin/e_comp_wl.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index bd20167bb..df3372d7e 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -113,13 +113,19 @@ _e_comp_wl_surface_outputs_update(E_Client *ec)
      }
 }
 
+/* The size in a configure is us telling the client how big to be, and
+ * xdg-shell keeps 0x0 for "whatever you like". So only fill one in when we
+ * are actually imposing a geometry - a resize we drove, a maximise, a
+ * fullscreen. A configure that merely carries a state change, focus being
+ * the common one, has to leave the size at zero: echoing back the size the
+ * client picked for itself reads as an instruction and pins it there. */
 static void
-_e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges)
+_e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool impose_size)
 {
    int w = 0, h = 0;
 
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (ec->changes.size || e_pixmap_usable_get(ec->pixmap))
+   if (impose_size && (ec->changes.size || e_pixmap_usable_get(ec->pixmap)))
      {
         if (e_comp_object_frame_exists(ec->frame))
           w = ec->client.w, h = ec->client.h;
@@ -1004,7 +1010,7 @@ _e_comp_wl_evas_cb_unmaximize_pre(void *data, Evas_Object *obj EINA_UNUSED, void
              *ecw = w, *ech = h;
           }
         ec->maximized = 0;
-        _e_comp_wl_configure_send(ec, 0);
+        _e_comp_wl_configure_send(ec, 0, EINA_TRUE);
         if ((!e_config->window_maximize_animate) || ec->maximize_anims_disabled)
           *ecw = ew, *ech = eh;
         ec->maximized = pmax;
@@ -1042,7 +1048,7 @@ _e_comp_wl_evas_cb_maximize_pre(void *data, Evas_Object *obj EINA_UNUSED, void *
              *ecw = w, *ech = h;
           }
         ec->maximized = *max;
-        _e_comp_wl_configure_send(ec, 0);
+        _e_comp_wl_configure_send(ec, 0, EINA_TRUE);
         if ((!e_config->window_maximize_animate) || ec->maximize_anims_disabled)
           *ecw = ew, *ech = eh;
         ec->maximized = pmax;
@@ -1109,7 +1115,7 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event
                                             x, y);
      }
    else
-     _e_comp_wl_configure_send(ec, 1);
+     _e_comp_wl_configure_send(ec, 1, EINA_TRUE);
 }
 
 static void
@@ -1122,7 +1128,7 @@ _e_comp_wl_evas_cb_state_update(void *data, Evas_Object *obj EINA_UNUSED, void *
    /* check for wayland pixmap */
 
    if (ec->comp_data->shell.configure_send)
-     _e_comp_wl_configure_send(ec, 0);
+     _e_comp_wl_configure_send(ec, 0, EINA_TRUE);
 }
 
 static void
@@ -1858,7 +1864,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
           }
      }
    else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface && !ec->iconic)
-     _e_comp_wl_configure_send(ec, 0);
+     _e_comp_wl_configure_send(ec, 0, EINA_FALSE);
 
    state->sx = 0;
    state->sy = 0;
@@ -3117,7 +3123,7 @@ _e_comp_wl_client_cb_focus_set(void *data EINA_UNUSED, E_Client *ec)
    if (ec->comp_data->shell.configure_send)
      {
         if (ec->comp_data->shell.surface)
-          _e_comp_wl_configure_send(ec, 1);
+          _e_comp_wl_configure_send(ec, 1, EINA_FALSE);
      }
 
    //if ((ec->icccm.take_focus) && (ec->icccm.accepts_focus))
@@ -3141,7 +3147,7 @@ _e_comp_wl_client_cb_focus_unset(void *data EINA_UNUSED, E_Client *ec)
    if (ec->comp_data->shell.configure_send)
      {
         if (ec->comp_data->shell.surface)
-          _e_comp_wl_configure_send(ec, 1);
+          _e_comp_wl_configure_send(ec, 1, EINA_FALSE);
      }
 
    if (e_comp_wl->kbd.focus == ec->comp_data->surface)

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

Reply via email to