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 c54d6b21e69b94ebc46a2ebd539261981803371d
Author: [email protected] <[email protected]>
AuthorDate: Sat Mar 7 20:44:30 2026 -0700

    fix: prevent black screen at startup by guarding premature zone creation
    
    During e_randr2_init(), _do_apply() was called before e_comp->ee/evas
    existed, causing e_comp_canvas_update() to create broken zones with NULL
    evas objects. These duplicate zones persisted alongside the real zones
    created later by e_comp_canvas_init(), resulting in a black screen after
    the startup animation.
    
    Guard the canvas/zone update in _do_apply() with an e_comp->ee check,
    and move the E_EVENT_RANDR_CHANGE event to fire unconditionally at the
    end of e_randr2_init() so it is not skipped in the restore path.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 src/bin/e_randr2.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index 48d3c414c..0ca7bf03d 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;
 }
 
@@ -336,11 +336,17 @@ _do_apply(void)
    _screen_config_eval();
    printf("RRR: really apply config...\n");
    e_comp->screen->apply();
-   printf("RRR: update canvas and zones after apply...\n");
-   e_comp_canvas_resize(e_randr2->w, e_randr2->h);
-   e_randr2_screens_setup(e_comp->w, e_comp->h);
-   e_comp_canvas_update();
-   ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
+   // only update canvas/zones if compositor is initialized. during
+   // e_randr2_init(), _do_apply() is called before e_comp->ee/evas exist,
+   // so e_comp_canvas_update() would create broken zones with NULL evas
+   // objects, causing duplicate zones and a black screen at startup.
+   if (e_comp->ee)
+     {
+        e_comp_canvas_resize(e_randr2->w, e_randr2->h);
+        e_randr2_screens_setup(e_comp->w, e_comp->h);
+        e_comp_canvas_update();
+        ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
+     }
    printf("RRR: done config...\n");
 }
 

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

Reply via email to