From 5d62ec3ceeb575d3183788604ba49e2c38c44dec Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 10 Mar 2017 15:57:15 -0500 Subject: [PATCH] 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 b9f7a86df..8ce6656d9 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 1c98b6235..836e08635 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)