raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e8ca66527af596682e52e79d110d09ed9f2b3492

commit e8ca66527af596682e52e79d110d09ed9f2b3492
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Nov 10 11:37:09 2020 +0000

    e wl - fix randr fully to not even init if managed
    
    @fix
---
 src/bin/e_randr2.c              | 5 ++++-
 src/modules/wl_x11/e_mod_main.c | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index 8145cbffb..5eef77e13 100644
--- a/src/bin/e_randr2.c
+++ b/src/bin/e_randr2.c
@@ -35,6 +35,7 @@ static Ecore_Timer   *_screen_delay_timer = NULL;
 static Eina_Bool      event_screen = EINA_FALSE;
 static Eina_Bool      event_ignore = EINA_FALSE;
 static Eina_Bool      initted = EINA_FALSE;
+static Eina_Bool      blocked = EINA_FALSE;
 
 /////////////////////////////////////////////////////////////////////////
 E_API E_Config_Randr2 *e_randr2_cfg = NULL;
@@ -55,6 +56,7 @@ e_randr2_init(void)
    int count;
 
    if (!E_EVENT_RANDR_CHANGE) E_EVENT_RANDR_CHANGE = ecore_event_type_new();
+   if (blocked) return EINA_FALSE;
    if ((!e_comp->screen) || (!e_comp->screen->available) || 
(!e_comp->screen->available())) return EINA_FALSE;
    initted = EINA_TRUE;
    // create data descriptors for config storage
@@ -150,7 +152,8 @@ e_randr2_shutdown(void)
 E_API void
 e_randr2_stop(void)
 {
-   e_randr2_shutdown();
+   blocked = EINA_TRUE;
+   if (initted) e_randr2_shutdown();
 }
 
 E_API Eina_Bool
diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c
index a22ff5121..575f04102 100644
--- a/src/modules/wl_x11/e_mod_main.c
+++ b/src/modules/wl_x11/e_mod_main.c
@@ -36,6 +36,7 @@ e_modapi_init(E_Module *m)
              if (win == win2) managed = EINA_TRUE;
           }
      }
+   if (managed) e_randr2_stop();
 
    if (!e_comp->ee)
      {
@@ -66,7 +67,6 @@ e_modapi_init(E_Module *m)
 
    e_comp_wl->dmabuf_disable = EINA_TRUE;
 
-   if (managed) e_randr2_stop();
    return m;
 }
 

-- 


Reply via email to