This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enlightenment.

View the commit online.

commit b4fc3e20ec32c5cf879c5a1c5955482e14b22875
Author: [email protected] <[email protected]>
AuthorDate: Sat Mar 7 18:27:32 2026 -0700

    fix: prevent double zone reconfiguration on RandR hotplug disconnect
    
    Commit 8dcd24974 added canvas and zone updates inside _do_apply() to
    synchronize the compositor with X hardware changes. However, this created
    a double reconfiguration bug: _cb_screen_change_delay() was already
    performing these same updates before _do_apply() runs asynchronously
    (after the fade-to-black animation), causing zones to reconfigure twice.
    
    This double reconfiguration broke shelf autohide behavior and triggered
    unwanted desktop fileman gadget rescans (spinning circle with file count).
    
    The fix:
    1. In _cb_screen_change_delay: wrap canvas/zone update in if (!change) —
       when change is true, _do_apply() handles it after the actual X config
    2. In e_randr2_init: move E_EVENT_RANDR_CHANGE into the else branch to
       avoid duplicating the event already fired by _do_apply()
    
    This ensures canvas/zone synchronization happens exactly once per
    configuration change, either in the animated path (_do_apply) or the
    direct path (_cb_screen_change_delay), but never both.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 src/bin/e_randr2.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index ec8e2f620..48d3c414c 100644
--- a/src/bin/e_randr2.c
+++ b/src/bin/e_randr2.c
@@ -122,8 +122,8 @@ e_randr2_init(void)
      {
         _config_update(e_randr2, e_randr2_cfg, 0);
         ecore_job_add(_cb_delay_init_save, NULL);
+        ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
      }
-   ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
    return EINA_TRUE;
 }
 
@@ -989,11 +989,19 @@ _cb_screen_change_delay(void *data EINA_UNUSED)
      }
    // update screen info after the above apply or due to external changes
    e_randr2_screeninfo_update();
-   e_comp_canvas_resize(e_randr2->w, e_randr2->h);
-   e_randr2_screens_setup(e_comp->w, e_comp->h);
-   e_comp_canvas_update();
-   // tell the rest of e some screen reconfigure thing happened
-   ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
+   // only update canvas/zones here if _do_apply() won't do it later
+   // (via the animated apply callback). when change is true,
+   // _do_apply() handles canvas/zone update after the actual X config
+   // change to avoid a double zone reconfiguration that breaks shelf
+   // autohide and triggers desktop gadget rescans.
+   if (!change)
+     {
+        e_comp_canvas_resize(e_randr2->w, e_randr2->h);
+        e_randr2_screens_setup(e_comp->w, e_comp->h);
+        e_comp_canvas_update();
+        // tell the rest of e some screen reconfigure thing happened
+        ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
+     }
    event_screen = EINA_FALSE;
    event_ignore = EINA_FALSE;
    return EINA_FALSE;

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

Reply via email to