discomfitor pushed a commit to branch master.

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

commit 5d62ec3ceeb575d3183788604ba49e2c38c44dec
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 10 15:57:15 2017 -0500

    make E_COMP_SIZE a global comp resizing env var
---
 src/bin/e_comp_canvas.c            | 15 ++++++++++++++-
 src/modules/wl_buffer/e_mod_main.c |  5 -----
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c
index b9f7a86..8ce6656 100644
--- a/src/bin/e_comp_canvas.c
+++ b/src/bin/e_comp_canvas.c
@@ -321,10 +321,23 @@ e_comp_canvas_init(int w, int h)
 {
    Evas_Object *o;
    Eina_List *screens;
+   char *bsize;
 
-   e_comp->evas = ecore_evas_get(e_comp->ee);
    e_comp->w = w;
    e_comp->h = h;
+   bsize = getenv("E_COMP_SIZE");
+   if (bsize)
+     {
+        int ew = w, eh = h;
+
+        if (sscanf(bsize, "%dx%d", &ew, &eh) == 2)
+          {
+             if ((w > 0) && (h > 0))
+               e_comp->w = ew, e_comp->h = eh;
+          }
+     }
+
+   e_comp->evas = ecore_evas_get(e_comp->ee);
 
    if (e_first_frame)
      evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_POST, 
_e_comp_canvas_cb_first_frame, NULL);
diff --git a/src/modules/wl_buffer/e_mod_main.c 
b/src/modules/wl_buffer/e_mod_main.c
index 1c98b62..836e086 100644
--- a/src/modules/wl_buffer/e_mod_main.c
+++ b/src/modules/wl_buffer/e_mod_main.c
@@ -5,15 +5,10 @@ E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, 
"Wl_Buffer" };
 E_API void *
 e_modapi_init(E_Module *m)
 {
-   char *bsize;
    int w = 1024, h = 768;
 
    printf("LOAD Wl_Buffer MODULE\n");
 
-   bsize = getenv("E_WL_SIZE");
-   if (bsize)
-     sscanf(bsize, "%dx%d", &w, &h);
-
    e_comp->ee = ecore_evas_buffer_new(w, h);
 
    if (!e_comp->ee)

-- 


Reply via email to