make E_COMP_SIZE a global comp resizing env var

This commit is contained in:
Mike Blumenkrantz 2017-03-10 15:57:15 -05:00
parent 7828db4575
commit 5d62ec3cee
2 changed files with 14 additions and 6 deletions

View File

@ -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);

View File

@ -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)