[EGIT] [core/efl] master 01/01: build: do not use a absolute system path for service files during distcheck

2017-02-08 Thread Stefan Schmidt
stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=355bba8276c80055c12e4e048fe6ba57e2fa4db6

commit 355bba8276c80055c12e4e048fe6ba57e2fa4db6
Author: Stefan Schmidt 
Date:   Wed Feb 8 12:05:12 2017 +0100

build: do not use a absolute system path for service files during distcheck

Our systemd service files are installed into an absolute system path by 
default
which simply does not work when doing a distcheck. Set the path differently 
for
the distcheck options.
---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index c2affd1..56de42d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
 AM_MAKEFLAGS = --no-print-directory
 AM_DISTCHECK_CONFIGURE_FLAGS = \
 --with-tests=regular \
+--with-systemdunitdir=. \
 --enable-always-build-examples
 
 SUBDIRS = src data config doc

-- 




[EGIT] [core/efl] master 18/20: eina debug monitor - dont use XDG_RUNTIME_DIR if setuid

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit bb9bb28538d20d54d8eb70540db49c35fc6a
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 20:15:10 2017 +0900

eina debug monitor - dont use XDG_RUNTIME_DIR if setuid

avoids possible issues with debug monitor + setuid
---
 src/lib/eina/eina_debug_monitor.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/lib/eina/eina_debug_monitor.c 
b/src/lib/eina/eina_debug_monitor.c
index 06e939b..1044d53 100644
--- a/src/lib/eina/eina_debug_monitor.c
+++ b/src/lib/eina/eina_debug_monitor.c
@@ -650,10 +650,16 @@ _eina_debug_monitor_signal_init(void)
 static const char *
 _socket_home_get(void)
 {
+   static char *dir;
+
+   if (dir) return dir;
// get possible debug daemon socket directory base
-   const char *dir = getenv("XDG_RUNTIME_DIR");
-   if (!dir) dir = eina_environment_home_get();
-   if (!dir) dir = eina_environment_tmp_get();
+#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
+   if (getuid() == geteuid()) dir = getenv("XDG_RUNTIME_DIR");
+#endif
+   if (!dir) dir = (char *)eina_environment_home_get();
+   if (!dir) dir = (char *)eina_environment_tmp_get();
+   dir = strdup(dir);
return dir;
 }
 

-- 




[EGIT] [core/efl] master 08/20: eina utils - home and tmp environ - store statitcally and handle setuid

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8094893877c4c176d1d647fee5adf5a25db60244

commit 8094893877c4c176d1d647fee5adf5a25db60244
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 17:35:26 2017 +0900

eina utils - home and tmp environ - store statitcally and handle setuid

if setuod we dont want to trust HOME environ at all and get it from
passwd file... also we dont want to keep re-getting too... so store
statically as well as tmp.

this also kind of helps CID 1366469
---
 src/lib/eina/eina_util.c | 34 +-
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c
index 62e1a79..1515172 100644
--- a/src/lib/eina/eina_util.c
+++ b/src/lib/eina/eina_util.c
@@ -24,6 +24,10 @@
 #include 
 #ifdef _WIN32
 # include 
+#else
+# include 
+# include 
+# include 
 #endif
 
 #include "eina_config.h"
@@ -51,9 +55,10 @@ static char home_storage[8];
 EAPI const char *
 eina_environment_home_get(void)
 {
-#ifdef _WIN32
-   char *home;
+   static char *home = NULL;
 
+   if (home) return home;
+#ifdef _WIN32
home = getenv("USERPROFILE");
if (!home) home = getenv("WINDIR");
if (!home &&
@@ -66,17 +71,36 @@ eina_environment_home_get(void)
  }
if (!home) home = "C:\\";
 
-   return home;
 #else
-   return getenv("HOME");
+# if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
+   if (getuid() == geteuid()) home = getenv("HOME");
+# endif
+   if (!home)
+ {
+# ifdef HAVE_GETPWENT
+struct passwd pwent, *pwent2 = NULL;
+char pwbuf[8129];
+
+if (!getpwuid_r(getuid(), &pwent, pwbuf, sizeof(pwbuf), &pwent2))
+  {
+ if ((pwent2) && (pwent.pw_dir))
+   home = strdup(pwent.pw_dir);
+  }
+if (!home) home = strdup("/tmp");
+return home;
+ }
+# endif
 #endif
+   home = strdup(home);
+   return home;
 }
 
 EAPI const char *
 eina_environment_tmp_get(void)
 {
-   char *tmp = NULL;
+   static char *tmp = NULL;
 
+   if (tmp) return tmp;
 #ifdef _WIN32
tmp = getenv("TMP");
if (!tmp) tmp = getenv("TEMP");

-- 




[EGIT] [core/efl] master 20/20: evas yuv convert - fix unused increments

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit a84370fcd87d03176981debb8dd98afda72956f8
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 21:07:21 2017 +0900

evas yuv convert - fix unused increments

this removes useless yp1 += and yop2 += as they are SET int he loop.
this fixes 1367510 and 1367511
---
 src/lib/evas/common/evas_convert_yuv.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/evas/common/evas_convert_yuv.c 
b/src/lib/evas/common/evas_convert_yuv.c
index 9d2e8ff..d199ec5 100644
--- a/src/lib/evas/common/evas_convert_yuv.c
+++ b/src/lib/evas/common/evas_convert_yuv.c
@@ -1648,8 +1648,6 @@ _evas_nv12torgb_raster(unsigned char **yuv, unsigned char 
*rgb, int w, int h)
 /* jump one line */
 dp1 += sizeof (int) * w;
 dp2 += sizeof (int) * w;
-yp1 += w;
-yp2 += w;
  }
 }
 

-- 




[EGIT] [core/efl] master 12/20: efl vpath - be paranoid about setuid execution and dont use env vars

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit e77f3b75d6da722128b269d499b72013958c0b60
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 18:11:07 2017 +0900

efl vpath - be paranoid about setuid execution and dont use env vars

if setuid, do not trust env vars for any xdg stuff at all.
---
 src/lib/efl/interfaces/efl_vpath_core.c | 22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_vpath_core.c 
b/src/lib/efl/interfaces/efl_vpath_core.c
index f82e75a..cedbfca 100644
--- a/src/lib/efl/interfaces/efl_vpath_core.c
+++ b/src/lib/efl/interfaces/efl_vpath_core.c
@@ -71,10 +71,17 @@ _efl_vpath_core_efl_object_constructor(Eo *obj, 
Efl_Vpath_Core_Data *pd)
s = eina_environment_tmp_get();
efl_vpath_core_meta_set(obj, "tmp", s);
 
-#define ENV_HOME_SET(_env, _dir, _meta) \
+# if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
+#  define ENV_HOME_SET(_env, _dir, _meta) \
+   if ((getuid() != geteuid()) || (!(s = getenv(_env { \
+  snprintf(buf, sizeof(buf), "%s/"_dir, home); s = buf; \
+   } efl_vpath_core_meta_set(obj, _meta, s);
+#else
+#  define ENV_HOME_SET(_env, _dir, _meta) \
if (!(s = getenv(_env))) { \
-snprintf(buf, sizeof(buf), "%s/"_dir, home); s = buf; \
- } efl_vpath_core_meta_set(obj, _meta, s);
+  snprintf(buf, sizeof(buf), "%s/"_dir, home); s = buf; \
+   } efl_vpath_core_meta_set(obj, _meta, s);
+#endif
// $XDG_DATA_HOME defines the base directory relative to which user
//   specific data files should be stored. If $XDG_DATA_HOME is either
//   not set or empty, a default equal to $HOME/.local/share should be
@@ -96,7 +103,11 @@ _efl_vpath_core_efl_object_constructor(Eo *obj, 
Efl_Vpath_Core_Data *pd)
//   directory MUST be owned by the user, and he MUST be the only one
//   having read and write access to it. Its Unix access mode MUST
//   be 0700.
+#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (!(s = getenv("XDG_RUNTIME_DIR")))
+#else
+   if ((getuid() != geteuid()) || (!(s = getenv("XDG_RUNTIME_DIR"
+#endif
  {
 #ifdef HAVE_GETUID
 struct stat st;
@@ -120,9 +131,10 @@ _efl_vpath_core_efl_object_constructor(Eo *obj, 
Efl_Vpath_Core_Data *pd)
  else s = (char *)efl_vpath_core_meta_get(obj, "tmp");
   }
 #else
-   s = (char *)efl_vpath_core_meta_get(obj, "tmp");
+s = (char *)efl_vpath_core_meta_get(obj, "tmp");
 #endif
  }
+   if (!s) s = (char *)efl_vpath_core_meta_get(obj, "tmp");
efl_vpath_core_meta_set(obj, "run", s);
// https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
// https://wiki.archlinux.org/index.php/Xdg_user_directories
@@ -326,7 +338,7 @@ _efl_vpath_core_efl_vpath_fetch(Eo *obj, 
Efl_Vpath_Core_Data *pd EINA_UNUSED, co
 }
 #endif /* HAVE_GETPWENT */
   }
-// (:xxx/* ... <- meta has table
+// (:xxx:)/* ... <- meta hash table
 if ((path[0] == '(') && (path[1] == ':'))
   {
  const char *p, *meta;

-- 




[EGIT] [core/efl] master 07/20: edje_cc - fix potential divide by 0 in info output if file size is 0

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 5b4c032fb5dc73f2fc8fce124c32c59426cdbb25
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 16:43:50 2017 +0900

edje_cc - fix potential divide by 0 in info output if file size is 0

this will realistically never happen in a sane case... but its
theoretically possible. fixes CID 1366923
---
 src/bin/edje/edje_cc_out.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 1d33bdd..fc456b8 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -786,6 +786,7 @@ data_thread_fonts(void *data, Ecore_Thread *thread 
EINA_UNUSED)
int bytes = 0;
char buf[EINA_PATH_MAX];
char buf2[EINA_PATH_MAX];
+   size_t size;
 
f = eina_file_open(fc->fn->file, 0);
if (f)
@@ -835,9 +836,10 @@ data_thread_fonts(void *data, Ecore_Thread *thread 
EINA_UNUSED)
 return;
  }
 
+   size = eina_file_size_get(f);
INF("Wrote %9i bytes (%4iKb) for \"%s\" font entry \"%s\" compress: [real: 
%2.1f%%]",
bytes, (bytes + 512) / 1024, buf, fc->fn->file,
-   100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f)))
+   100 - (100 * (double)bytes) / ((double)((size > 0) ? size : 1))
);
eina_file_map_free(f, m);
eina_file_close(f);

-- 




[EGIT] [core/efl] master 03/20: evas image obj - remove logically dead code

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=144092b2fac39a8e70606130ab05afda7faa240a

commit 144092b2fac39a8e70606130ab05afda7faa240a
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 15:35:19 2017 +0900

evas image obj - remove logically dead code

coverity is right - it's logically dead code. fix CID 1367774
---
 src/lib/evas/canvas/evas_object_image.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 796d07d..fb878c0 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -879,7 +879,7 @@ _efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, 
Evas_Image_Data *o, c
int quality = 80, compress = 9, ok = 0;
char *encoding = NULL;
Image_Entry *ie;
-   Eina_Bool putback = EINA_FALSE, tofree = EINA_FALSE, tgv = EINA_FALSE, 
free_data = EINA_FALSE;
+   Eina_Bool putback = EINA_FALSE, tofree = EINA_FALSE, tgv = EINA_FALSE;
Evas_Colorspace cspace = EVAS_COLORSPACE_ARGB;
Evas_Colorspace want_cspace = EVAS_COLORSPACE_ARGB;
int imagew, imageh;
@@ -1034,8 +1034,6 @@ _efl_canvas_image_internal_efl_file_save(const Eo 
*eo_obj, Evas_Image_Data *o, c
else if (putback)
  o->engine_data = ENFN->image_data_put(ENDT, pixels, data);
 
-   if (free_data) free(data);
-
free(encoding);
return ok;
 }

-- 




[EGIT] [core/efl] master 02/20: evas image load - remove unreachable code

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit b5348e47cc13258d7b92ba5ebae281556076c3ae
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 11:54:45 2017 +0900

evas image load - remove unreachable code

it's just printing a warning anyway and coverity CID 1368210 is right
as it says it's unreachable. fix.
---
 src/lib/evas/common/evas_image_load.c | 16 
 1 file changed, 16 deletions(-)

diff --git a/src/lib/evas/common/evas_image_load.c 
b/src/lib/evas/common/evas_image_load.c
index ca9a28c..b871bfe 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -359,22 +359,6 @@ evas_common_load_rgba_image_module_from_file(Image_Entry 
*ie)
INF("exhausted all means to load image '%s'", file);
return EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
 
-   if (ret != EVAS_LOAD_ERROR_NONE)
- {
-const char *modname = NULL;
-int modversion = -1;
-
-if (em && em->definition)
-  {
- modname = em->definition->name;
- modversion = em->definition->version;
-  }
-WRN("loader '%s' (version %d) "
-"handled file '%s', key '%s' with errors: %s",
-modname ? modname : "", modversion,
-file, ie->key ? ie->key : "",
-evas_load_error_str(ret));
- }
 end:
DBG("loader '%s' used for file %s",
(em && em->definition && em->definition->name) ?

-- 




[EGIT] [core/efl] master 13/20: evas gl generic - comment switch fallthrough as intended

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=98aac6118d69c94d8954d5cc0347ffb5c67eeeb5

commit 98aac6118d69c94d8954d5cc0347ffb5c67eeeb5
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 18:38:42 2017 +0900

evas gl generic - comment switch fallthrough as intended

this is intended. document as such.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index e0e3f6d..49ef878 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -3018,8 +3018,10 @@ eng_image_data_slice_add(void *engdata, void *image,
  {
   case EFL_GFX_COLORSPACE_ARGB:
 bpp = 4;
+// falltrhough is intended
   case EFL_GFX_COLORSPACE_AGRY88:
 if (!bpp) bpp = 2;
+// falltrhough is intended
   case EFL_GFX_COLORSPACE_GRY8:
 if (!bpp) bpp = 1;
 if (plane != 0) goto fail;

-- 




[EGIT] [core/efl] master 10/20: elm config - forbid bakcslash in profile name too

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2cdc63024d9f63e9d2752adef5f836baab9b2bde

commit 2cdc63024d9f63e9d2752adef5f836baab9b2bde
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 17:51:52 2017 +0900

elm config - forbid bakcslash in profile name too

/ already is forbidden but \ might be valid on windows, so forbid it
too.
---
 src/lib/elementary/elm_config.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 49fdcd5..2854122 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1456,6 +1456,8 @@ _profile_fetch_from_conf(void)
   {
  p = strchr(_elm_profile, '/');
  if (p) *p = 0;
+ p = strchr(_elm_profile, '\\');
+ if (p) *p = 0;
  if (!strcmp(_elm_profile, ".."))
{
   free(_elm_profile);

-- 




[EGIT] [core/efl] master 01/20: evas image load - handle null module handle in case

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit c657d41fc3342b95030bdf2acde070895cf091b2
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 11:45:09 2017 +0900

evas image load - handle null module handle in case

this fixes CID 1368338
---
 src/lib/evas/common/evas_image_load.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/common/evas_image_load.c 
b/src/lib/evas/common/evas_image_load.c
index b27bae2..ca9a28c 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -381,9 +381,17 @@ end:
em->definition->name : "",
file);
 
-   ie->info.module = em;
-   ie->info.loader = em->functions;
-   if (em) evas_module_ref(em);
+   if (em)
+ {
+ie->info.module = em;
+ie->info.loader = em->functions;
+evas_module_ref(em);
+ }
+   else
+ {
+ie->info.module = NULL;
+ie->info.loader = NULL;
+ }
return ret;
 }
 

-- 




[EGIT] [core/efl] master 06/20: eet data - fix checking return value of eina_value_pset like elsewhere

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit f6638432d3164cc7982f84109282263aad5c9374
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 16:36:57 2017 +0900

eet data - fix checking return value of eina_value_pset like elsewhere

eina_value_pset() return is checked pretty much everywhere except
here. this addresses that inconsistency. this fixes CID 1367487
---
 src/lib/eet/eet_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index 865eee9..b0231ad 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -1349,7 +1349,7 @@ eet_data_get_value(const Eet_Dictionary *ed,
 Eina_Value **value = dst;
 
 *value = eina_value_new(eina_type);
-eina_value_pset(*value, tmp);
+if (!eina_value_pset(*value, tmp)) return -1;
 
 return eet_size + type_size;
  }

-- 




[EGIT] [core/efl] master 16/20: evas cserver client - remove dead if 0'd code

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 5bb34aa2ce11440480444bcd9889e43ee17af024
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 19:12:51 2017 +0900

evas cserver client - remove dead if 0'd code
---
 src/lib/evas/cserve2/evas_cs2_client.c | 22 --
 1 file changed, 22 deletions(-)

diff --git a/src/lib/evas/cserve2/evas_cs2_client.c 
b/src/lib/evas/cserve2/evas_cs2_client.c
index 329727b..5e001eb 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -127,28 +127,6 @@ _socket_path_set(char *path)
snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid());
/* FIXME: check we can actually create this socket */
strcpy(path, buf);
-#if 0   
-#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
-   if (getuid() == geteuid())
-#endif
- {
-env = getenv("XDG_RUNTIME_DIR");
-if (!env || !env[0])
-  {
- env = eina_environment_home_get();
- if (!env || !env[0])
-   {
-  env = eina_environment_tmp_get();
-  if (!env || !env[0])
-env = "/tmp";
-   }
-  }
-
-snprintf(buf, sizeof(buf), "%s/evas-cserve2-%x.socket", env, getuid());
-/* FIXME: check we can actually create this socket */
-strcpy(path, buf);
- }
-#endif   
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 14/20: evas gl generic - remove dead code else case

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=09e1a75f4fc0f9783d9d9c7a673d6fee2661b25b

commit 09e1a75f4fc0f9783d9d9c7a673d6fee2661b25b
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 18:43:29 2017 +0900

evas gl generic - remove dead code else case

plane limits are checked at top of function so no need to check in the
middle again. it's dead code. fixes CID 1362729
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 49ef878..412580e 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -3070,7 +3070,6 @@ eng_image_data_slice_add(void *engdata, void *image,
  for (int y = 0; y < (h / 2); y++)
cs_data[h + (h / 2) + y] = slice->bytes + (y * stride);
   }
-else goto fail;
 break;
 
   case EFL_GFX_COLORSPACE_YCBCR422601_PL:

-- 




[EGIT] [core/efl] master 04/20: eina share - fix spinlock release if magic check fails on share data

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7b736d20b8c198c40d8f818fd3469bed882cd323

commit 7b736d20b8c198c40d8f818fd3469bed882cd323
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 16:20:17 2017 +0900

eina share - fix spinlock release if magic check fails on share data

this fixes a potential double spinlock unrelease if magic check fails
on share data. this fixes CID 1367493
---
 src/lib/eina/eina_share_common.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eina/eina_share_common.c b/src/lib/eina/eina_share_common.c
index 33142dc..7fb8f90 100644
--- a/src/lib/eina/eina_share_common.c
+++ b/src/lib/eina/eina_share_common.c
@@ -766,11 +766,11 @@ eina_share_common_add_length(Eina_Share *share,
el = _eina_share_common_head_find(ed, str, slen);
if (el)
  {
-EINA_MAGIC_CHECK_SHARE_COMMON_NODE(el,
-   share->node_magic,
-   eina_spinlock_release(&_mutex_big));
+EINA_MAGIC_CHECK_SHARE_COMMON_NODE
+  (el, share->node_magic,
+   eina_spinlock_release(&_mutex_big); return NULL);
 el->references++;
-   eina_spinlock_release(&_mutex_big);
+eina_spinlock_release(&_mutex_big);
 return el->str;
  }
 

-- 




[EGIT] [core/efl] master 09/20: elm config - handle profile name of ".." as its obviously invalid

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=944ce7ef41164f3d3db06b05df1df4023e310230

commit 944ce7ef41164f3d3db06b05df1df4023e310230
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 17:50:47 2017 +0900

elm config - handle profile name of ".." as its obviously invalid

this forbids .., as a profile name in addition to the existing "stip /
from profile name".
---
 src/lib/eina/eina_util.c| 6 ++
 src/lib/elementary/elm_config.c | 7 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c
index 1515172..93396ae 100644
--- a/src/lib/eina/eina_util.c
+++ b/src/lib/eina/eina_util.c
@@ -107,8 +107,6 @@ eina_environment_tmp_get(void)
if (!tmp) tmp = getenv("USERPROFILE");
if (!tmp) tmp = getenv("WINDIR");
if (!tmp) tmp = "C:\\";
-
-   return tmp;
 #else
 # if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
@@ -120,7 +118,7 @@ eina_environment_tmp_get(void)
 if (!tmp) tmp = getenv("TEMP");
  }
if (!tmp) tmp = "/tmp";
-
-   return tmp;
 #endif
+   tmp = strdup(tmp);
+   return tmp;
 }
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index a7f8547..49fdcd5 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1456,8 +1456,13 @@ _profile_fetch_from_conf(void)
   {
  p = strchr(_elm_profile, '/');
  if (p) *p = 0;
+ if (!strcmp(_elm_profile, ".."))
+   {
+  free(_elm_profile);
+  _elm_profile = NULL;
+   }
+ else return;
   }
-return;
  }
 
for (i = 0; i < 2; i++)

-- 




[EGIT] [core/efl] master 11/20: evas callbacks - add comment to note fallthrough is intended

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=93abad0a599c7dde79ee36dc551042777f4e03fd

commit 93abad0a599c7dde79ee36dc551042777f4e03fd
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 17:57:35 2017 +0900

evas callbacks - add comment to note fallthrough is intended

swtich fallthrough oftenis not intended but in this case it is, so
documente it as such.
---
 src/lib/evas/canvas/evas_callbacks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_callbacks.c 
b/src/lib/evas/canvas/evas_callbacks.c
index f67b0c2..84f07ff 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -186,6 +186,7 @@ _eo_evas_object_cb(void *data, const Efl_Event *event)
 
   case EFL_EVENT_TYPE_FOCUS:
  event_info = NULL;
+// NOTE: fallthrough here is explicitly intended!!!
   case EFL_EVENT_TYPE_NULL:
   case EFL_EVENT_TYPE_STRUCT:
   case EFL_EVENT_TYPE_OBJECT:

-- 




[EGIT] [core/efl] master 19/20: evas mask filter - remove unused increment of msk as its set in-loop

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=020535eea16e7e44a4562450d29cfadf65e5454a

commit 020535eea16e7e44a4562450d29cfadf65e5454a
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 21:04:46 2017 +0900

evas mask filter - remove unused increment of msk as its set in-loop

msk is set inside the loop body, so msk += is pointless.

fix CID 1367512
---
 src/lib/evas/filters/evas_filter_mask.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_mask.c 
b/src/lib/evas/filters/evas_filter_mask.c
index c6d08dd..c13493c 100644
--- a/src/lib/evas/filters/evas_filter_mask.c
+++ b/src/lib/evas/filters/evas_filter_mask.c
@@ -324,7 +324,7 @@ _mask_cpu_alpha_alpha_rgba(Evas_Filter_Command *cmd)
func = evas_common_gfx_func_composite_mask_color_span_get(color, 1, 1, 
_gfx_to_evas_render_op(op));
span_func = efl_draw_alpha_func_get(cmd->draw.rop, EINA_TRUE);
 
-   for (y = 0, my = 0; y < h; y++, my++, msk += mw)
+   for (y = 0, my = 0; y < h; y++, my++)
  {
 if (my >= mh) my = 0;
 

-- 




[EGIT] [core/efl] master 05/20: evas cache image - remove double unlock of image task locks.

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit b61e69a956e6080f492f76bcd3e2cc14a7256d32
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 16:30:54 2017 +0900

evas cache image - remove double unlock of image task locks.

this is indeed a bug and fixes coverity CID 1367492
---
 src/lib/evas/cache/evas_cache_image.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/evas/cache/evas_cache_image.c 
b/src/lib/evas/cache/evas_cache_image.c
index 68cea1c..e0bea1d 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -545,8 +545,6 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, 
const Eo *target)
   task = eina_list_data_get(l);
   ie->tasks = eina_list_remove_list(ie->tasks, l);
   if (task != &dummy_task) free(task);
-  SLKU(ie->lock_task);
-
   free(tg);
   break;
}

-- 




[EGIT] [core/efl] master 15/20: elput - use vpath to get xdg runtime to also be setuid safe

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=24e34e19a1db84cdcb6241207cb99d14ca83c41b

commit 24e34e19a1db84cdcb6241207cb99d14ca83c41b
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 19:10:44 2017 +0900

elput - use vpath to get xdg runtime to also be setuid safe

this fixes CID 1357168 in the case of setuid binaries as vpath handles
setuid cases.
---
 src/lib/elput/elput_evdev.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index a83ebc1..028bf62 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,16 +60,19 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat 
*seat)
 static int
 _keyboard_fd_get(off_t size)
 {
+   const char *path;
+   Eina_Tmpstr *fullname;
+   long flags;
int fd = 0;
-   char *path;
char tmp[PATH_MAX];
-   long flags;
-   Eina_Tmpstr *fullname;
-
-   if (!(path = getenv("XDG_RUNTIME_DIR")))
- return -1;
 
+   Efl_Vpath_File *file_obj =
+ efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
+   efl_vpath_file_do(file_obj);
+   efl_vpath_file_wait(file_obj);
+   path = efl_vpath_file_result_get(file_obj);
snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XX", path);
+   efl_del(file_obj);
 
fd = eina_file_mkstemp(tmp, &fullname);
if (fd < 0) return -1;

-- 




[EGIT] [core/efl] master 17/20: ecore_con - only use XDG_RUNTIME_DIR if not setuid

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit c6ff925132e414ca1753de075ea1db45a62212ca
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 19:15:19 2017 +0900

ecore_con - only use XDG_RUNTIME_DIR if not setuid

this should address possible misuse of this env var in setuid apps.
keep using home and tmp to maintain socket "abi" (the filenames that
are used).
---
 src/lib/ecore_con/ecore_con_local.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con_local.c 
b/src/lib/ecore_con/ecore_con_local.c
index a66a8b4..fa909c8 100644
--- a/src/lib/ecore_con/ecore_con_local.c
+++ b/src/lib/ecore_con/ecore_con_local.c
@@ -29,10 +29,14 @@
 static const char *
 _ecore_con_local_path_get(void)
 {
-   const char *homedir = getenv("XDG_RUNTIME_DIR");
-   if (!homedir) homedir = eina_environment_home_get();
-   if (!homedir) homedir = eina_environment_tmp_get();
+   static char *homedir = NULL;
+   if (homedir) return homedir;
 
+#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
+   if (getuid() == geteuid()) homedir = getenv("XDG_RUNTIME_DIR");
+#endif
+   if (!homedir) homedir = (char *)eina_environment_home_get();
+   if (!homedir) homedir = (char *)eina_environment_tmp_get();
return homedir;
 }
 

-- 




Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Felipe Magno de Almeida
I don't get the reluctance on releasing now. IMO, if we stop releasing
in a timely fashion, EFL will become full of bugs again. EFL was
becoming quite stable with the releases that Stefan has been managing.
If we start questioning the releases, we will always find reasons why
not to release now. But the benefits of releasing often and with
predictable periods have proven to be big IMO.

On Tue, Feb 7, 2017 at 11:06 AM, Gustavo Sverzut Barbieri
 wrote:
>>> Like I'd love to see efl_net being tested in the field as it's what
>>> ecore_con uses internally to provide legacy, as well as people being
>>> able to use the Eo API directly.
>>>
>>
>> People can't use the EO API directly. Or are we declaring EO stable now? If
>> so we need to properly separate which EO APIs are "final" and which are
>> still work in progress (all UI). So, efl_net will be tested only through
>> ecore_con.
>>
>> efl_net itself will wait until the rest of EO is released. Or did I miss
>> something?
>
> ecore_con (old API is written on top of the EO api), as in one uses
> the other, as they are vastly different, "eo_legacy" shortcut couldn't
> be used.
>
> But they go to the same code, with all infra on top (ecore_ipc,
> ecore_file, elm_image...)
>
>
>
>
> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (16) 99354-9890
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Felipe Magno de Almeida

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: elput: Minor formatting fix

2017-02-08 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=95d93cb7208857cc89d79f3ffbbd7ee71ba1936f

commit 95d93cb7208857cc89d79f3ffbbd7ee71ba1936f
Author: Chris Michael 
Date:   Wed Feb 8 08:29:24 2017 -0500

elput: Minor formatting fix

NB: No functional changes, just some minor formatting adjustments

Signed-off-by: Chris Michael 
---
 src/lib/elput/elput_evdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 028bf62..1cdf381 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -65,9 +65,9 @@ _keyboard_fd_get(off_t size)
long flags;
int fd = 0;
char tmp[PATH_MAX];
+   Efl_Vpath_File *file_obj;
 
-   Efl_Vpath_File *file_obj =
- efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
+   file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
efl_vpath_file_do(file_obj);
efl_vpath_file_wait(file_obj);
path = efl_vpath_file_result_get(file_obj);

-- 




Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Al Poole
I'm agreeing with Felipe here.

What say ye?

On Wed, Feb 8, 2017 at 1:29 PM, Felipe Magno de Almeida <
felipe.m.alme...@gmail.com> wrote:

> I don't get the reluctance on releasing now. IMO, if we stop releasing
> in a timely fashion, EFL will become full of bugs again. EFL was
> becoming quite stable with the releases that Stefan has been managing.
> If we start questioning the releases, we will always find reasons why
> not to release now. But the benefits of releasing often and with
> predictable periods have proven to be big IMO.
>
> On Tue, Feb 7, 2017 at 11:06 AM, Gustavo Sverzut Barbieri
>  wrote:
> >>> Like I'd love to see efl_net being tested in the field as it's what
> >>> ecore_con uses internally to provide legacy, as well as people being
> >>> able to use the Eo API directly.
> >>>
> >>
> >> People can't use the EO API directly. Or are we declaring EO stable
> now? If
> >> so we need to properly separate which EO APIs are "final" and which are
> >> still work in progress (all UI). So, efl_net will be tested only through
> >> ecore_con.
> >>
> >> efl_net itself will wait until the rest of EO is released. Or did I miss
> >> something?
> >
> > ecore_con (old API is written on top of the EO api), as in one uses
> > the other, as they are vastly different, "eo_legacy" shortcut couldn't
> > be used.
> >
> > But they go to the same code, with all infra on top (ecore_ipc,
> > ecore_file, elm_image...)
> >
> >
> >
> >
> > --
> > Gustavo Sverzut Barbieri
> > --
> > Mobile: +55 (16) 99354-9890
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
>
> --
> Felipe Magno de Almeida
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Stefan Schmidt
Hello.

I let this thread sit for a while to get some more insights.

On 07/02/17 03:56, Jean-Philippe André wrote:
> Hey,
>
> Sorry, it looks like I worded my questions badly :)
>
> On 6 February 2017 at 20:36, Gustavo Sverzut Barbieri 
> wrote:
>
>> On Mon, Feb 6, 2017 at 8:31 AM, Stefan Schmidt 
>> wrote:
>>> Hello.
>>>
>>> On 06/02/17 10:33, Jean-Philippe André wrote:
 Hi,

 On 1 February 2017 at 23:46, Stefan Schmidt 
>> wrote:

> Hello.
>
> On 12/12/16 11:34, Stefan Schmidt wrote:
>> Hello.
>>
>> Next try. People started to ask me about 1.19 again more recently so
>> here is my new schedule proposal for 1.19.
>>
>> 2016-08-11 Merge window for 1.19 opens
>> 2017-02-07 Merge window is over.
>>   * Only bug fixes from this point
>>   * Alpha release tarball
>>   * One month stabilization phase starts
>> 2017-02-13 Beta1 release tarball
>>   * Only critical fixes from this point
>> 2017-02-20 Beta2 release tarball
>> 2017-02-27 Beta3 release tarball
>> 2017-03-06 EFL 1.19 is out (First Monday in March)
>>
>> Comments?
>
> I heard two people in favor and no complains. If you want to postpone
> this state this NOW or I will proceed as the above schedule.
>

 I'm currently working on improving the Gfx Filters (evas filters for
>> blur,
 etc...), adding new features and moving to GL. I don't know exactly how
 long I still need but I'm not ready right now to merge this work in
 progress unless we disable the GL accel by default (fine by me).
>>>
>>> What is so important about it that is has to be in this release? Why is
>>> the next one not good enough for it?
>>
>
> Not much besides the personal burden of maintaining a branch and rebasing
> it. I can handle that :)

Great, thanks.

>
>
 As for the EO interfaces we are obviously not ready to finalize now.
>>>
>>> And how making this a blocker for the release turned out you have seen
>>> last year already? Same mistakes all over again?
>>>
 Cmake is also work in progress...
>>>
>>> I already stated before that I'm not going to wait for cmake to be
>>> default in 1.19. This effort needs a lot more time and I want at least
>>> one more release where autotools is the default. Its not even near
>>> completion of what we have with autotools right now.
>>
>> yes, don't wait on cmake as it won't happen soon. We're just starting
>> to convert, after everything is converted we'll need to check for
>> other platforms (BSD, MacOS and Windows), then check if the build is
>> the same (ie: compiler/linker flags are not there, and if they were,
>> are they producing the same effect? same for all the #ifdef's that
>> maybe silently hide behavior changes).
>>
>
> My only point with gl filters, eo intf and cmake is that we have those
> works in progress that need to be put on hold if we're intent on doing this
> release properly. In other words: stop developing in branches, except for
> the regular rebase on master, and focus on fixing existing issues.

Understood now. :)

That is basically the same feeling raster does express. Putting active 
work aside to work on stabilization. Its about timing. The work on cmake 
and eo/intf will keep us busy for a way longer time though. Which means 
at some point we would have to stop the work anyway for another release.

My stanca here is that we might do a release now so we have a few months 
of uninterrupted development work afterwards. :)

>>
>> Time-based releases keep the expectations if they are followed. Once
>> we miss the frame, we start to have this feature-based releases ("oh,
>> waited so long, can wait a bit more") and when people work
>> independently, they always have some in-flux work that could get in...
>> so at some point these guys will want to delay a bit more so their
>> work gets in as well... endless wait -- AKA e17/efl-1.0
>>
>> IOW: just do it, and let's not miss the 3 month schedule next time. ;-)
>>
>
> I agree. I didn't mean to disagree, I just wanted the question to be raised.
> And yes, we shouldn't have postponed this release so much once we realised
> that the EO APIs would not be ready so soon.

Agreed as well :)

> In fact it would probably be safer to strictly stick to the 3 months
> schedule and postpone features rather than postponing releases.

I would be fine with this. Its just that I don't wanted to step on other 
peoples feet by demanding them to work on a release now. I'm ok with 
smaller slips in the schedule and if things need to be discussed that is 
also ok to hold of the schedule (like right now), but last year was a 
real setback from what we had before and I wanted to address that.

regards
Stefan Schmidt

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__

[EGIT] [core/efl] master 01/01: evas gl commonnon - context - expand fields to 2 bits for invalid vals

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=876c407977e66c2b5a147088269a742f7f872419

commit 876c407977e66c2b5a147088269a742f7f872419
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 22:57:28 2017 +0900

evas gl commonnon - context - expand fields to 2 bits for invalid vals

we use invalid values (-1 or 0xff or 0x3 etc. invalid vals to know to reset
some state). expand fields out in size a little bit to allow that to
work again.
---
 src/modules/evas/engines/gl_common/evas_gl_common.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h 
b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 00945a0..dc8ccd6 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -295,11 +295,11 @@ struct _Evas_Engine_GL_Context
  GLuint   cur_tex, cur_texu, cur_texv, cur_texa, cur_texm;
  int  tex_target;
  int  cx, cy, cw, ch;
- unsigned charrender_op;
- Eina_Boolsmooth  : 1;
- Eina_Boolblend   : 1;
- Eina_Boolmask_smooth : 1;
- Eina_Boolclip: 1;
+ char render_op;
+ Eina_Boolsmooth  : 2;
+ Eina_Boolblend   : 2;
+ Eina_Boolmask_smooth : 2;
+ Eina_Boolclip: 2;
   } shader;
   struct {
  intnum, alloc;

-- 




[EGIT] [core/efl] master 01/01: when resetting tex_target, set it to -1 so we force a reset

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8f2cfdf4900e8e8b13f48c213512041e5f937f4b

commit 8f2cfdf4900e8e8b13f48c213512041e5f937f4b
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Feb 8 22:59:37 2017 +0900

when resetting tex_target, set it to -1 so we force a reset
---
 src/modules/evas/engines/gl_common/evas_gl_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index e3589a2..79b1bc1 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -1587,7 +1587,7 @@ 
evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
gc->state.current.cur_texv = 0;
gc->state.current.cur_texa = 0;
gc->state.current.cur_texm = 0;
-   gc->state.current.tex_target = GL_TEXTURE_2D;
+   gc->state.current.tex_target = -1;
gc->state.current.render_op = -1;
gc->state.current.smooth = -1;
gc->state.current.blend = -1;

-- 




Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Stefan Schmidt
Hello.

On 07/02/17 08:28, Carsten Haitzler (The Rasterman) wrote:
> On Tue, 7 Feb 2017 11:56:38 +0900 Jean-Philippe André  
> said:
>
>> My only point with gl filters, eo intf and cmake is that we have those
>> works in progress that need to be put on hold if we're intent on doing this
>> release properly. In other words: stop developing in branches, except for
>> the regular rebase on master, and focus on fixing existing issues.
>
> this is an issue. the cmake work has to stop then. well it can go off to a
> branch... but it cant happen in master.

The moving around of libs and bins into seperate dirs could not happen 
as it could affect our autotools build as well. I personally see no 
problem when more CMakeLists.txt are added during the stabilization as 
long as they do not touch any parts of the autotools build.

>>> Time-based releases keep the expectations if they are followed. Once
>>> we miss the frame, we start to have this feature-based releases ("oh,
>>> waited so long, can wait a bit more") and when people work
>>> independently, they always have some in-flux work that could get in...
>>> so at some point these guys will want to delay a bit more so their
>>> work gets in as well... endless wait -- AKA e17/efl-1.0
>>>
>>> IOW: just do it, and let's not miss the 3 month schedule next time. ;-)
>>>
>>
>> I agree. I didn't mean to disagree, I just wanted the question to be raised.
>> And yes, we shouldn't have postponed this release so much once we realised
>> that the EO APIs would not be ready so soon.
>>
>> In fact it would probably be safer to strictly stick to the 3 months
>> schedule and postpone features rather than postponing releases.
>
> then we need to pause various work and stop doing any eo/interfaces work or
> filters, cmake etc. and get down to bug fixing if we are to do a release...

That is the same concern JP expressed. I understand the reluctance, but 
given that at least cmake and eo/intf work will be with us for a longer 
time my call would be to make a release now, get over with it and have 
some nice fresh development months afterwards to get this all in better 
shape. :)

regards
Stefan Schmidt

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Stefan Schmidt
Hello.

On 07/02/17 10:37, Carsten Haitzler (The Rasterman) wrote:
> On Tue, 7 Feb 2017 18:25:58 +1030 Simon Lees  said:
>
>>
>>
>> On 02/06/2017 10:06 PM, Gustavo Sverzut Barbieri wrote:
>>>
>>> Time-based releases keep the expectations if they are followed. Once
>>> we miss the frame, we start to have this feature-based releases ("oh,
>>> waited so long, can wait a bit more") and when people work
>>> independently, they always have some in-flux work that could get in...
>>> so at some point these guys will want to delay a bit more so their
>>> work gets in as well... endless wait -- AKA e17/efl-1.0
>>>
>>> IOW: just do it, and let's not miss the 3 month schedule next time. ;-)
>>>
>>>
>>
>> The problem is people (even some in Samsung) are writing software that
>> depends on unstable eo, regardless of whether its wrong or right its
>> happening. This means that every release there is an extra bunch of work
>> for downstream projects to roll another release and then for distro's to
>> package all theses changes.

What are the offending packages you have to deal with here? As far as I 
know it neither Enlightenment nor Termonology nor Rage is using any EO 
based API.

They only ones I know of are developer tools like Edi, Eventor and 
Efleete. Are these packaged in OpenSUSE?

>> Until the eo interfaces are done the cost of releasing is high, so
>> releasing every 3 months for release sake when there isn't many new
>> features such as the last release of last year that didn't happen
>> doesn't make sense.
>>
>> If we are now at a point where there is significant new things then lets
>> release now, if there is more significant new things in 3 months lets
>> release again then, if there is no new things in 3 months releasing
>> again then probably also doesn't make sense.

Its not 3 months this time either. Even when we start 1.19 stabilization 
now it would be almost 6 months between 1.18 and 1.19.
Its not like I would not listen and speed along.

>> So in short, if we want to go back to 3 monthly releases lets get eo
>> interfaces done so releases stop being as much effort for a bunch of people.

It is just not a simple task. Its _huge_ and the last time we tried to 
estimate it and execute it in the estimated timeframe we failed. We all 
want to get it out but it takes time.

>> Cheers, from the guy who gets to deal with the mess at the other end.

I'm sorry for that. Remember the times where we had no releases at all 
and people tried to package our software. It could have broken with 
every commit. :) My feeling is that we on the right track even if 
eo/intf makes more trouble than we imagined.  :(

> that is a very good point. the reliance on eo anyway... and thus a 1.19 will
> mean everything that did (wrongly) rely on it has to update/rev and release 
> too.

That was the case for various former releases as well. It is a pain for 
people like Simon I fully understand this, but it is nothing new for 1.19.

regards
Stefan Schmidt

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/enlightenment] master 01/01: Batman - Don't show hard to read and redundant text in the gadget itself - Move it to a popup on left click.

2017-02-08 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

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

commit 75cbcf5b4774fbb778b2cb4b85812d59b6fbda9b
Author: Stephen 'Okra' Houston 
Date:   Wed Feb 8 08:56:51 2017 -0600

Batman - Don't show hard to read and redundant text in the gadget itself - 
Move it to a popup on left click.
---
 src/modules/sysinfo/batman/batman.c  | 159 ++-
 src/modules/sysinfo/batman/batman.h  |   2 +-
 src/modules/sysinfo/batman/batman_fallback.c |   2 +-
 src/modules/sysinfo/mod.c|   1 -
 src/modules/sysinfo/sysinfo.c|   1 -
 src/modules/sysinfo/sysinfo.h|   2 +-
 6 files changed, 108 insertions(+), 59 deletions(-)

diff --git a/src/modules/sysinfo/batman/batman.c 
b/src/modules/sysinfo/batman/batman.c
index 534c747..be6d7e0 100644
--- a/src/modules/sysinfo/batman/batman.c
+++ b/src/modules/sysinfo/batman/batman.c
@@ -42,10 +42,7 @@ static void
 _batman_face_level_set(Evas_Object *battery, double level)
 {
Edje_Message_Float msg;
-   char buf[256];
 
-   snprintf(buf, sizeof(buf), "%i", (int)(level * 100.0));
-   elm_layout_text_set(battery, "e.text.reading", buf);
if (level < 0.0) level = 0.0;
else if (level > 1.0)
  level = 1.0;
@@ -54,22 +51,92 @@ _batman_face_level_set(Evas_Object *battery, double level)
 }
 
 static void
-_batman_face_time_set(Evas_Object *battery, int t)
+_batman_popup_dismissed(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
-   char buf[256];
-   int hrs, mins;
+   Instance *inst = data;
+   E_FREE_FUNC(obj, evas_object_del);
+   inst->cfg->batman.popup = NULL;
+}
+
+static void
+_batman_popup_deleted(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   Instance *inst = data;
+   inst->cfg->batman.popup = NULL;
+}
 
-   if (t < 0) return;
+static Evas_Object *
+_batman_popup_create(Instance *inst)
+{
+   Evas_Object *popup, *box, *frame, *pbar;
+   Battery *bat;
+   Eina_List *l;
+   char buf[4096];
+   int hrs = 0, mins = 0;
 
-   hrs = (t / 3600);
-   mins = ((t) / 60 - (hrs * 60));
+   hrs = (inst->cfg->batman.time_left / 3600);
+   mins = ((inst->cfg->batman.time_left) / 60 - (hrs * 60));
if (mins < 0) mins = 0;
-   snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins); 
-   elm_layout_text_set(battery, "e.text.time", buf);
+
+   popup = elm_ctxpopup_add(e_comp->elm);
+   elm_object_style_set(popup, "noblock");
+   evas_object_smart_callback_add(popup, "dismissed",
+  _batman_popup_dismissed, inst);
+   evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL,
+  _batman_popup_deleted, inst);
+
+   frame = elm_frame_add(popup);
+   E_EXPAND(frame); E_FILL(frame);
+   snprintf(buf, sizeof(buf), _("Time Remaining: %i:%02i"), hrs, mins);
+   elm_object_text_set(frame, buf);
+   elm_object_content_set(popup, frame);
+   evas_object_show(frame);
+
+   box = elm_box_add(frame);
+   elm_box_horizontal_set(box, EINA_FALSE);
+   E_EXPAND(box); E_FILL(box);
+   elm_object_content_set(frame, box);
+   evas_object_show(box);
+
+   EINA_LIST_FOREACH(batman_device_batteries, l, bat)
+ {
+pbar = elm_progressbar_add(frame);
+E_EXPAND(pbar); E_FILL(pbar);
+elm_progressbar_span_size_set(pbar, 200 * e_scale);
+elm_progressbar_value_set(pbar, bat->percent / 100);
+elm_object_content_set(frame, pbar);
+evas_object_show(pbar);
+ }
+   e_gadget_util_ctxpopup_place(inst->o_main, popup,
+inst->cfg->batman.o_gadget);
+   evas_object_show(popup);
+
+   return popup;
+}
+
+static void
+_batman_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_data)
+{
+   Evas_Event_Mouse_Down *ev = event_data;
+   Instance *inst = data;
+
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+   if (ev->button != 3)
+ {
+if (inst->cfg->batman.popup)
+  {
+ elm_ctxpopup_dismiss(inst->cfg->batman.popup);
+ inst->cfg->batman.popup = NULL;
+  }
+else
+  {
+ inst->cfg->batman.popup = _batman_popup_create(inst);
+  }
+ }
 }
 
 void
-_batman_update(Instance *inst, int full, int time_left, int time_full, 
Eina_Bool have_battery, Eina_Bool have_power)
+_batman_update(Instance *inst, int full, int time_left, Eina_Bool 
have_battery, Eina_Bool have_power)
 {
static double debounce_time = 0.0;
 
@@ -109,24 +176,6 @@ _batman_update(Instance *inst, int full, int time_left, 
int time_full, Eina_Bool
else
  {
 _batman_face_level_set(inst->cfg->batman.o_gadget, 0.0);
-elm_layout_text_set(inst->cfg->batman.o_gadget,
-  "e.text.reading",
-  _("N/A"));
- }
-
-   if ((time_full < 0) && (time_left != inst->cfg->batman.time_lef

[EGIT] [core/efl] master 01/01: Give Batman it's own edc.

2017-02-08 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

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

commit e7b2dc001797cbbc9439f3e79a6f6b2a534a3885
Author: Stephen 'Okra' Houston 
Date:   Wed Feb 8 08:54:44 2017 -0600

Give Batman it's own edc.
---
 data/elementary/themes/Makefile.am|   1 +
 data/elementary/themes/default.edc|   1 +
 data/elementary/themes/edc/batman.edc | 287 ++
 3 files changed, 289 insertions(+)

diff --git a/data/elementary/themes/Makefile.am 
b/data/elementary/themes/Makefile.am
index 42e0b28..d48aaca 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -22,6 +22,7 @@ elementary/themes/edc/appmenu.edc \
 elementary/themes/edc/background.edc \
 elementary/themes/edc/backlight.edc \
 elementary/themes/edc/battery.edc \
+elementary/themes/edc/batman.edc \
 elementary/themes/edc/bluez4.edc \
 elementary/themes/edc/border.edc \
 elementary/themes/edc/border-icons.edc \
diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 5e801b4..936df6b 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -142,6 +142,7 @@ collections {
 #include "edc/backlight.edc"
 #include "edc/mixer.edc"
 #include "edc/battery.edc"
+#include "edc/batman.edc"
 #include "edc/evrything.edc"
 #include "edc/illume.edc"
 #include "edc/bluez4.edc"
diff --git a/data/elementary/themes/edc/batman.edc 
b/data/elementary/themes/edc/batman.edc
new file mode 100644
index 000..d05eeb7
--- /dev/null
+++ b/data/elementary/themes/edc/batman.edc
@@ -0,0 +1,287 @@
+group { name: "e/modules/batman/main";
+   images.image: "bat_shadow.png" COMP;
+   images.image: "bat_base.png" COMP;
+   images.image: "bat_shine.png" COMP;
+   images.image: "bat_bottom0.png" COMP;
+   images.image: "bat_bottom1.png" COMP;
+   images.image: "bat_top0.png" COMP;
+   images.image: "bat_top1.png" COMP;
+   images.image: "glow_med_white.png" COMP;
+   script {
+  public message(Msg_Type:type, id, ...) {
+ if ((type == MSG_FLOAT) && (id == 1)) {
+new Float:val;
+new r = 51, g = 153, b = 255;
+new lr = 255, lg = 0, lb = 0;
+
+val = getfarg(2);
+if (val < 0.35) {
+   new Float:val1, Float:val2;
+   
+   val1 = (val - 0.10) / 0.25;
+   val2 = 1.0 - val1;
+   r = round((r * val1) + (lr * val2), ROUND);
+   g = round((g * val1) + (lg * val2), ROUND);
+   b = round((b * val1) + (lb * val2), ROUND);
+} 
+custom_state(PART:"fill", "default", 0.0);
+set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+set_state_val(PART:"fill", STATE_REL1, 0.0, 1.0 - val);
+set_state(PART:"fill", "custom", 0.0);
+ }
+  }
+   }
+   parts {
+  part { name: "fade_clip"; type: RECT;
+ description { state: "default" 0.0;
+color: 255 255 255 255;
+ }
+ description { state: "faded" 0.0;
+color: 128 128 128 255;
+ }
+  }
+  part { name: "pulse_clip"; type: RECT;
+ clip_to: "fade_clip";
+ description { state: "default" 0.0;
+color: 255 255 255 255;
+ }
+ description { state: "faded" 1.0;
+color: 255 255 255 255;
+ }
+ description { state: "faded" 0.0;
+color: 255 255 255 64;
+ }
+  }
+  part { name: "fill_region"; type: SPACER;
+ description { state: "default" 0.0;
+rel1.to: "bg";
+rel2.to: "bg";
+ }
+  }
+  part { name: "pwr"; type: SPACER;
+ description { state: "default" 0.0;
+rel1.to: "bg";
+rel1.relative: 0.40 0.40;
+rel2.to: "bg";
+rel2.relative: 0.60 0.60;
+aspect: 1.0 1.0; aspect_preference: BOTH;
+step: 5 5;
+ }
+  }
+  part { name: "base"; type: SPACER;
+ description { state: "default" 0.0;
+aspect: 1.0 1.0; aspect_preference: BOTH;
+ }
+  }
+  part { name: "shadow";
+ clip_to: "pulse_clip";
+ description { state: "default" 0.0;
+rel1.to: "top";
+rel1.offset: -4 0;
+rel2.to: "bottom";
+rel2.offset: 3 3;
+image.normal: "bat_shadow.png";
+ }
+  }
+  part { name: "bg";
+ clip_to: "pulse_clip";
+ description { state: "default" 0.0;
+rel1.to: "top";
+rel1.relative: 0.0 1.0;
+rel2.to: "bottom";
+rel2.relative: 1.0 0.0;
+image.normal: "bat_base.png";
+fill.smooth: 0;
+ }
+  }
+  part { name: "

[EGIT] [core/efl] master 02/02: Revert "elput - use vpath to get xdg runtime to also be setuid safe"

2017-02-08 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=62a22fd401128affb4f9bdca6d6db35a90dd6e19

commit 62a22fd401128affb4f9bdca6d6db35a90dd6e19
Author: Derek Foreman 
Date:   Wed Feb 8 09:37:49 2017 -0600

Revert "elput - use vpath to get xdg runtime to also be setuid safe"

This reverts commit 24e34e19a1db84cdcb6241207cb99d14ca83c41b.

This broke keyboard input for the enlightenment wayland compositor,
please test elput changes on at least one of the drm backends,
preferably with enlightenment.

The wayland compositor is hard enough to keep stable due to breakage
from core changes only tested on X - but elput's main user is our
wayland compositor, was this tested anywhere?
---
 src/lib/elput/elput_evdev.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 028bf62..a83ebc1 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,19 +60,16 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat 
*seat)
 static int
 _keyboard_fd_get(off_t size)
 {
-   const char *path;
-   Eina_Tmpstr *fullname;
-   long flags;
int fd = 0;
+   char *path;
char tmp[PATH_MAX];
+   long flags;
+   Eina_Tmpstr *fullname;
+
+   if (!(path = getenv("XDG_RUNTIME_DIR")))
+ return -1;
 
-   Efl_Vpath_File *file_obj =
- efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
-   efl_vpath_file_do(file_obj);
-   efl_vpath_file_wait(file_obj);
-   path = efl_vpath_file_result_get(file_obj);
snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XX", path);
-   efl_del(file_obj);
 
fd = eina_file_mkstemp(tmp, &fullname);
if (fd < 0) return -1;

-- 




[EGIT] [core/efl] master 01/02: Revert "elput: Minor formatting fix"

2017-02-08 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=53cc1eab045ed6acb86155ae0f77006873df6125

commit 53cc1eab045ed6acb86155ae0f77006873df6125
Author: Derek Foreman 
Date:   Wed Feb 8 09:36:46 2017 -0600

Revert "elput: Minor formatting fix"

This reverts commit 95d93cb7208857cc89d79f3ffbbd7ee71ba1936f.

Formatting change on top of a totally untested coverity fix that
breaks input for enlightenment's wayland compositor.

 #TeamworkIsDeprecated
---
 src/lib/elput/elput_evdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 1cdf381..028bf62 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -65,9 +65,9 @@ _keyboard_fd_get(off_t size)
long flags;
int fd = 0;
char tmp[PATH_MAX];
-   Efl_Vpath_File *file_obj;
 
-   file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
+   Efl_Vpath_File *file_obj =
+ efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
efl_vpath_file_do(file_obj);
efl_vpath_file_wait(file_obj);
path = efl_vpath_file_result_get(file_obj);

-- 




[E-devel] Fixing Coverity Issues (Re: [EGIT] [core/efl] master 02/02: Revert "elput - use vpath to get xdg runtime to also be setuid safe")

2017-02-08 Thread Mike Blumenkrantz
Hi,

We've had threads and discussions about blindly pushing fixes for Coverity
issues before, and it seemed to me that the consensus was we should stop
engaging in such risky behaviors and only focus on issues in areas that we
directly work on and are actively testing. It's easy enough to make
mistakes while contributing ordinary untested code, but it seems to be a
pattern that more mistakes are made when contributing untested code in
unfamiliar areas.

Let's try to work more collaboratively on these and notify the people who
work on the corresponding components when we're working on fixes for them.

On Wed, Feb 8, 2017 at 10:50 AM Derek Foreman 
wrote:

> derekf pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/efl.git/commit/?id=62a22fd401128affb4f9bdca6d6db35a90dd6e19
>
> commit 62a22fd401128affb4f9bdca6d6db35a90dd6e19
> Author: Derek Foreman 
> Date:   Wed Feb 8 09:37:49 2017 -0600
>
> Revert "elput - use vpath to get xdg runtime to also be setuid safe"
>
> This reverts commit 24e34e19a1db84cdcb6241207cb99d14ca83c41b.
>
> This broke keyboard input for the enlightenment wayland compositor,
> please test elput changes on at least one of the drm backends,
> preferably with enlightenment.
>
> The wayland compositor is hard enough to keep stable due to breakage
> from core changes only tested on X - but elput's main user is our
> wayland compositor, was this tested anywhere?
> ---
>  src/lib/elput/elput_evdev.c | 15 ++-
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
> index 028bf62..a83ebc1 100644
> --- a/src/lib/elput/elput_evdev.c
> +++ b/src/lib/elput/elput_evdev.c
> @@ -60,19 +60,16 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd,
> Elput_Seat *seat)
>  static int
>  _keyboard_fd_get(off_t size)
>  {
> -   const char *path;
> -   Eina_Tmpstr *fullname;
> -   long flags;
> int fd = 0;
> +   char *path;
> char tmp[PATH_MAX];
> +   long flags;
> +   Eina_Tmpstr *fullname;
> +
> +   if (!(path = getenv("XDG_RUNTIME_DIR")))
> + return -1;
>
> -   Efl_Vpath_File *file_obj =
> - efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
> -   efl_vpath_file_do(file_obj);
> -   efl_vpath_file_wait(file_obj);
> -   path = efl_vpath_file_result_get(file_obj);
> snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XX", path);
> -   efl_del(file_obj);
>
> fd = eina_file_mkstemp(tmp, &fullname);
> if (fd < 0) return -1;
>
> --
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ecore-wl2: Don't send focus in/out events based on keyboard enter/leave

2017-02-08 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4b2188103d22b591a062c25c5154636bac727616

commit 4b2188103d22b591a062c25c5154636bac727616
Author: Chris Michael 
Date:   Wed Feb 8 11:51:21 2017 -0500

ecore-wl2: Don't send focus in/out events based on keyboard enter/leave

We should not be sending focus events based on keyboard behaviour, but
rather send them according to xdg shell activate status. This makes
our focus behaviour more "standards" compliant.

@fix

Signed-off-by: Chris Michael 
---
 src/lib/ecore_wl2/ecore_wl2_input.c   | 29 +
 src/lib/ecore_wl2/ecore_wl2_private.h |  3 +++
 src/lib/ecore_wl2/ecore_wl2_window.c  | 19 +--
 3 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 96665b9..636ddf9 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -408,10 +408,14 @@ _ecore_wl2_input_mouse_up_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window,
_input_event_cb_free, ev->dev);
 }
 
-static void
-_ecore_wl2_input_focus_in_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window)
+void
+_ecore_wl2_input_focus_in_send(Ecore_Wl2_Window *window)
 {
Ecore_Wl2_Event_Focus_In *ev;
+   Ecore_Wl2_Input *input;
+
+   input = ecore_wl2_window_input_get(window);
+   if (!input) return;
 
ev = calloc(1, sizeof(Ecore_Wl2_Event_Focus_In));
if (!ev) return;
@@ -423,10 +427,14 @@ _ecore_wl2_input_focus_in_send(Ecore_Wl2_Input *input, 
Ecore_Wl2_Window *window)
ev->dev);
 }
 
-static void
-_ecore_wl2_input_focus_out_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window 
*window)
+void
+_ecore_wl2_input_focus_out_send(Ecore_Wl2_Window *window)
 {
Ecore_Wl2_Event_Focus_Out *ev;
+   Ecore_Wl2_Input *input;
+
+   input = ecore_wl2_window_input_get(window);
+   if (!input) return;
 
ev = calloc(1, sizeof(Ecore_Wl2_Event_Focus_Out));
if (!ev) return;
@@ -846,15 +854,12 @@ _keyboard_cb_enter(void *data, struct wl_keyboard 
*keyboard EINA_UNUSED, unsigne
 
input->focus.keyboard = window;
window->input = input;
-
-   _ecore_wl2_input_focus_in_send(input, window);
 }
 
 static void
-_keyboard_cb_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, 
unsigned int serial, struct wl_surface *surface)
+_keyboard_cb_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, 
unsigned int serial, struct wl_surface *surface EINA_UNUSED)
 {
Ecore_Wl2_Input *input;
-   Ecore_Wl2_Window *window;
 
input = data;
if (!input) return;
@@ -866,13 +871,6 @@ _keyboard_cb_leave(void *data, struct wl_keyboard 
*keyboard EINA_UNUSED, unsigne
input->repeat.time = 0;
if (input->repeat.timer) ecore_timer_del(input->repeat.timer);
input->repeat.timer = NULL;
-
-   /* find the window which this surface belongs to */
-   window = _ecore_wl2_display_window_surface_find(input->display, surface);
-   if (!window) return;
-
-   _ecore_wl2_input_focus_out_send(input, window);
-
input->focus.keyboard = NULL;
 }
 
@@ -1582,7 +1580,6 @@ ecore_wl2_input_seat_get(Ecore_Wl2_Input *input)
 EAPI Ecore_Wl2_Seat_Capabilities
 ecore_wl2_input_seat_capabilities_get(Ecore_Wl2_Input *input)
 {
-
Ecore_Wl2_Seat_Capabilities cap = ECORE_WL2_SEAT_CAPABILITIES_NONE;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(input, cap);
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index c601e59..c44420a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -472,6 +472,9 @@ void _ecore_wl_window_semi_free(Ecore_Wl2_Window *window);
 
 void _ecore_wl2_offer_unref(Ecore_Wl2_Offer *offer);
 
+void _ecore_wl2_input_focus_in_send(Ecore_Wl2_Window *window);
+void _ecore_wl2_input_focus_out_send(Ecore_Wl2_Window *window);
+
 EAPI extern int _ecore_wl2_event_window_www;
 EAPI extern int _ecore_wl2_event_window_www_drag;
 
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 6d50ca3..fb75bf5 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -146,6 +146,11 @@ _xdg_surface_cb_configure(void *data, struct xdg_surface 
*xdg_surface EINA_UNUSE
   }
  }
 
+   if (win->focused)
+ _ecore_wl2_input_focus_in_send(win);
+   else
+ _ecore_wl2_input_focus_out_send(win);
+
win->configure_serial = serial;
if ((win->geometry.w == w) && (win->geometry.h == h))
  w = h = 0;
@@ -238,6 +243,11 @@ _zxdg_toplevel_cb_configure(void *data, struct 
zxdg_toplevel_v6 *zxdg_toplevel E
   }
  }
 
+   if (win->focused)
+ _ecore_wl2_input_focus_in_send(win);
+   else
+ _ecore_wl2_input_focus_out_send(win);
+
win->configure_serial = wl_display_get_serial(win->display->wl.display);
if ((win->geometry.w == width) && (win->geometry.h == height)

[EGIT] [core/efl] master 01/01: ecore-wl2: Support sending focus for wl_shell

2017-02-08 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4d627617594e36178c4621c7f887ac9cfc4f9122

commit 4d627617594e36178c4621c7f887ac9cfc4f9122
Author: Chris Michael 
Date:   Wed Feb 8 12:30:10 2017 -0500

ecore-wl2: Support sending focus for wl_shell

wl_shell does not use a surface state for activation, so we still need
to send the focus in/out for that based on keyboard enter/leave.

@fix

Signed-off-by: Chris Michael 
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 636ddf9..4d810a6 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -854,12 +854,16 @@ _keyboard_cb_enter(void *data, struct wl_keyboard 
*keyboard EINA_UNUSED, unsigne
 
input->focus.keyboard = window;
window->input = input;
+
+   if (window->wl_shell_surface)
+ _ecore_wl2_input_focus_in_send(window);
 }
 
 static void
-_keyboard_cb_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, 
unsigned int serial, struct wl_surface *surface EINA_UNUSED)
+_keyboard_cb_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, 
unsigned int serial, struct wl_surface *surface)
 {
Ecore_Wl2_Input *input;
+   Ecore_Wl2_Window *window;
 
input = data;
if (!input) return;
@@ -872,6 +876,11 @@ _keyboard_cb_leave(void *data, struct wl_keyboard 
*keyboard EINA_UNUSED, unsigne
if (input->repeat.timer) ecore_timer_del(input->repeat.timer);
input->repeat.timer = NULL;
input->focus.keyboard = NULL;
+
+   /* find the window which this surface belongs to */
+   window = _ecore_wl2_display_window_surface_find(input->display, surface);
+   if ((window) && (window->wl_shell_surface))
+ _ecore_wl2_input_focus_out_send(window);
 }
 
 static Eina_Bool

-- 




[EGIT] [core/enlightenment] master 01/01: Batman - Add the config popup to configure batman.

2017-02-08 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

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

commit b994562776bfb2e5fc80df4044a3ce49d1d58170
Author: Stephen 'Okra' Houston 
Date:   Wed Feb 8 13:08:14 2017 -0600

Batman - Add the config popup to configure batman.
---
 src/modules/Makefile_sysinfo.mk  |   1 +
 src/modules/sysinfo/batman/batman.c  |  82 +++-
 src/modules/sysinfo/batman/batman.h  |  13 +-
 src/modules/sysinfo/batman/batman_config.c   | 510 +++
 src/modules/sysinfo/mod.c|   6 +-
 src/modules/sysinfo/netstatus/netstatus_config.c |   2 +-
 src/modules/sysinfo/sysinfo.c|   2 +
 src/modules/sysinfo/sysinfo.h|   4 +-
 8 files changed, 605 insertions(+), 15 deletions(-)

diff --git a/src/modules/Makefile_sysinfo.mk b/src/modules/Makefile_sysinfo.mk
index 5d03162..ae2a950 100644
--- a/src/modules/Makefile_sysinfo.mk
+++ b/src/modules/Makefile_sysinfo.mk
@@ -17,6 +17,7 @@ src_modules_sysinfo_module_la_SOURCES = 
src/modules/sysinfo/mod.c \
 src/modules/sysinfo/batman/batman.h \
  src/modules/sysinfo/batman/batman.c \
  src/modules/sysinfo/batman/batman_fallback.c \
+ src/modules/sysinfo/batman/batman_config.c \
  src/modules/sysinfo/thermal/thermal.h \
  src/modules/sysinfo/thermal/thermal.c \
  src/modules/sysinfo/thermal/thermal_fallback.c \
diff --git a/src/modules/sysinfo/batman/batman.c 
b/src/modules/sysinfo/batman/batman.c
index be6d7e0..d201ae3 100644
--- a/src/modules/sysinfo/batman/batman.c
+++ b/src/modules/sysinfo/batman/batman.c
@@ -10,6 +10,8 @@ static void  _batman_cb_warning_popup_hide(void *data, 
Evas *e, Evas_Object
 static void  _batman_warning_popup_destroy(Instance *inst);
 static void  _batman_warning_popup(Instance *inst, int time, double 
percent);
 
+static Ecore_Event_Handler *_handler = NULL;
+
 Eina_List *
 _batman_battery_find(const char *udi)
 {
@@ -114,6 +116,16 @@ _batman_popup_create(Instance *inst)
return popup;
 }
 
+static Evas_Object *
+_batman_configure_cb(Evas_Object *g)
+{
+   Instance *inst = evas_object_data_get(g, "Instance");
+
+   if (!sysinfo_config) return NULL;
+   if (inst->cfg->batman.popup) return NULL;
+   return batman_configure(inst);
+}
+
 static void
 _batman_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_data)
 {
@@ -133,6 +145,41 @@ _batman_mouse_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
  inst->cfg->batman.popup = _batman_popup_create(inst);
   }
  }
+   else
+ {
+if (inst->cfg->batman.popup)
+  {
+ elm_ctxpopup_dismiss(inst->cfg->batman.popup);
+ inst->cfg->batman.popup = NULL;
+  }
+if (!sysinfo_config) return;
+ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+if (inst->cfg->esm != E_SYSINFO_MODULE_BATMAN)
+  batman_configure(inst);
+else
+  e_gadget_configure(inst->o_main);
+ }
+}
+
+static Eina_Bool
+_powersave_cb_config_update(void *data, int type EINA_UNUSED, void *event 
EINA_UNUSED)
+{
+   Instance *inst = data;
+
+   if (!inst->cfg->batman.have_battery)
+ e_powersave_mode_set(E_POWERSAVE_MODE_LOW);
+   else
+ {
+if (inst->cfg->batman.have_power)
+  e_powersave_mode_set(E_POWERSAVE_MODE_LOW);
+else if (inst->cfg->batman.full > 95)
+  e_powersave_mode_set(E_POWERSAVE_MODE_MEDIUM);
+else if (inst->cfg->batman.full > 30)
+  e_powersave_mode_set(E_POWERSAVE_MODE_HIGH);
+else
+  e_powersave_mode_set(E_POWERSAVE_MODE_EXTREME);
+ }
+   return ECORE_CALLBACK_RENEW;
 }
 
 void
@@ -386,6 +433,12 @@ _batman_warning_popup(Instance *inst, int t, double 
percent)
 
if ((!inst) || (inst->warning)) return;
 
+   hrs = (t / 3600);
+   mins = ((t) / 60 - (hrs * 60));
+   if (mins < 0) mins = 0;
+   snprintf(buf, 4096, _("AC power is recommended. %i:%02i Remaining"), hrs, 
mins);
+
+
if (inst->cfg->batman.desktop_notifications)
  {
 E_Notification_Notify n;
@@ -394,12 +447,6 @@ _batman_warning_popup(Instance *inst, int t, double 
percent)
 n.replaces_id = 0;
 n.icon.icon = "battery-low";
 n.summary = _("Your battery is low!");
-
-hrs = (t / 3600);
-mins = ((t) / 60 - (hrs * 60));
-if (mins < 0) mins = 0;
-snprintf(buf, 4096, _("AC power is recommended. %i:%02i Remaining"), 
hrs, mins);
-
 n.body = buf;
 n.timeout = inst->cfg->batman.alert_timeout * 1000;
 e_notification_client_send(&n, _batman_warning_popup_cb, inst);
@@ -432,8 +479,7 @@ _batman_warning_popup(Instance *inst, int t, double percent)
 
elm_layout_text_set(popup_bg

[EGIT] [core/enlightenment] master 01/01: Dispatch wayland frame callbacks in the correct order

2017-02-08 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit 20214807486da1abf9946d65bb3354cba32bc9a0
Author: Derek Foreman 
Date:   Wed Feb 8 13:25:09 2017 -0600

Dispatch wayland frame callbacks in the correct order

The protocol says they should be dispatched in the order they're
registered, so switch to list append instead of list prepend.
---
 src/bin/e_comp_wl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index eba0c4f..b8a64a6 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1690,7 +1690,7 @@ _e_comp_wl_surface_cb_frame(struct wl_client *client, 
struct wl_resource *resour
wl_resource_set_implementation(res, NULL, ec, _e_comp_wl_frame_cb_destroy);
 
ec->comp_data->pending.frames =
- eina_list_prepend(ec->comp_data->pending.frames, res);
+ eina_list_append(ec->comp_data->pending.frames, res);
 }
 
 static void

-- 




[EGIT] [apps/terminology] master 01/01: controls: clean up code

2017-02-08 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=6c5c7d486cec11236ce1a0a0bf58f8d01a17b410

commit 6c5c7d486cec11236ce1a0a0bf58f8d01a17b410
Author: Boris Faure 
Date:   Wed Feb 8 21:34:46 2017 +0100

controls: clean up code
---
 src/bin/controls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/controls.c b/src/bin/controls.c
index d5722ea..69e3ae1 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -377,9 +377,9 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, 
Evas_Object *term,
 evas_object_show(o);
 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, NULL);
-evas_object_event_callback_add(ct_over, EVAS_CALLBACK_DEL,
+evas_object_event_callback_add(o, EVAS_CALLBACK_DEL,
_cb_over_del, NULL);
-
+
 ct_win = win;
 ct_bg = bg;
 ct_term = term;

-- 




[EGIT] [apps/extra] master 01/01: extra: replace the cache once a bild has updated

2017-02-08 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/apps/extra.git/commit/?id=7ea72aa641e2ca011592001d0edbc4a7f56f04e3

commit 7ea72aa641e2ca011592001d0edbc4a7f56f04e3
Author: Marcel Hollerbach 
Date:   Thu Feb 9 00:15:40 2017 +0100

extra: replace the cache once a bild has updated

otherwise a update of a image does not get downloaded
---
 src/lib/extra.c| 12 +-
 src/lib/extra_api_helper.c | 98 --
 2 files changed, 97 insertions(+), 13 deletions(-)

diff --git a/src/lib/extra.c b/src/lib/extra.c
index 0dab25b..1aa19d2 100644
--- a/src/lib/extra.c
+++ b/src/lib/extra.c
@@ -388,6 +388,8 @@ _extra_preview_local_generate(const char *purpose, const 
char *id, int version)
return tmp;
 }
 
+Extra_Progress p = {NULL, NULL, NULL};
+
 EAPI char*
 extra_theme_preview_get(Extra_Theme *theme)
 {
@@ -403,7 +405,10 @@ extra_theme_preview_get(Extra_Theme *theme)
 free(local);
 local = NULL;
  }
-
+   else
+ {
+extra_theme_preview_download(&p, theme);
+ }
return local;
 }
 
@@ -712,7 +717,10 @@ extra_background_preview_get(Extra_Background *background)
 free(local);
 return NULL;
  }
-
+   else
+ {
+extra_background_preview_download(&p, background);
+ }
return local;
 }
 
diff --git a/src/lib/extra_api_helper.c b/src/lib/extra_api_helper.c
index b99da27..b03f7fd 100644
--- a/src/lib/extra_api_helper.c
+++ b/src/lib/extra_api_helper.c
@@ -194,9 +194,24 @@ extra_json_to_list(Extra_Json_To_List_Template *tmp, 
Eina_Strbuf *buf)
 typedef struct {
Extra_Request req;
Extra_Request **clean_up;
+   char *from;
+   char *to;
+   Ecore_File_Download_Job *cache;
+   Ecore_File_Download_Job *full;
 } Extra_Download_Job;
 
 static void
+_download_job_free(Extra_Download_Job *job)
+{
+   if (job->clean_up)
+ *job->clean_up = NULL;
+
+   free(job->from);
+   free(job->to);
+   free(job);
+}
+
+static void
 _download_complete_cb(void *data, const char *file EINA_UNUSED, int status 
EINA_UNUSED)
 {
Extra_Download_Job *job = data;
@@ -204,16 +219,14 @@ _download_complete_cb(void *data, const char *file 
EINA_UNUSED, int status EINA_
if (status != 200)
  ecore_file_remove(file);
 
-   *job->clean_up = NULL;
-
if (job->req.progress.done_cb)
  job->req.progress.done_cb(job->req.progress.data);
 
-   free(job);
+   _download_job_free(job);
 }
 
 static int
-_download_progress_cb(void *data EINA_UNUSED, const char *file EINA_UNUSED,
+_download_progress_cb(void *data, const char *file EINA_UNUSED,
   long int dltotal EINA_UNUSED, long int dlnow EINA_UNUSED,
   long int ultotal EINA_UNUSED, long int ulnow EINA_UNUSED)
 {
@@ -223,28 +236,91 @@ _download_progress_cb(void *data EINA_UNUSED, const char 
*file EINA_UNUSED,
if (dlnow > 0.f)
  percent = ((double)(double)dlnow / (double)dltotal);
 
+
if (job->req.progress.progress_cb)
  job->req.progress.progress_cb(job->req.progress.data, percent);
 
return ECORE_FILE_PROGRESS_CONTINUE;
 }
 
-void
-extra_file_download(Extra_Progress *progress, const char *from, const char 
*to, Extra_Request **req)
+static int
+_download_check_progress_cb(void *data EINA_UNUSED, const char *file,
+  long int dltotal EINA_UNUSED, long int dlnow EINA_UNUSED,
+  long int ultotal EINA_UNUSED, long int ulnow EINA_UNUSED)
 {
Extra_Download_Job *job;
+   struct stat st;
 
-   if (ecore_file_exists(to))
+   job = data;
+
+   if (dltotal == 0)
+ return ECORE_FILE_PROGRESS_CONTINUE;
+
+   if (!!stat(job->to, &st))
+ {
+ERR("Failed to fetch stat from %s", file);
+goto end;
+ }
+
+   if (st.st_size != dltotal)
  {
-//TODO better check the header and handle that sanely
-return;
+//the size of the image has changed ... remove and download again
+ecore_file_remove(job->to);
+ecore_file_download(job->from, job->to,
+  _download_complete_cb,
+  _download_progress_cb,
+  job, &job->full);
+goto end;
  }
+   else
+ {
+INF("Everything is ok\n");
+ecore_file_download_abort(job->cache);
+_download_job_free(job);
+ }
+   return ECORE_CALLBACK_CANCEL;
+
+end:
+   ecore_file_download_abort(job->cache);
+   job->cache = NULL;
+   return ECORE_CALLBACK_CANCEL;
+}
+
+void
+extra_file_download(Extra_Progress *progress, const char *from, const char 
*to, Extra_Request **req)
+{
+   Extra_Download_Job *job;
 
job = calloc(1, sizeof(Extra_Download_Job));
job->req.progress = *progress;
job->clean_up = req;
+   job->to = strdup(to);
+   job->from = strdup(from);
+
+   if (ecore_file_exists(to))
+ {
+char path[PATH_MAX], *dir;
+const char *file;
 
-   ecore_file_download(from, to, _download_complete_cb, _download_progress_cb, 
job, NULL);
+file = ecore_file_file_get(to);

[EGIT] [core/enlightenment] master 01/01: Luncher: Determine if client icon is an evas_object_image or edje_object.

2017-02-08 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

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

commit 67a59e5df5bfe29ada4ebee3c2a46cf3654f737b
Author: Stephen 'Okra' Houston 
Date:   Wed Feb 8 17:43:45 2017 -0600

Luncher: Determine if client icon is an evas_object_image or edje_object.
---
 src/modules/luncher/bar.c | 22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index e71a629..4b59528 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -1065,12 +1065,24 @@ _bar_icon_add(Instance *inst, Efreet_Desktop *desktop, 
E_Client *non_desktop_cli
  {
 Evas_Object *tmp;
 const char *file, *group;
+Eina_Bool ret = EINA_FALSE;
+
 tmp = e_client_icon_add(non_desktop_client, 
evas_object_evas_get(ic->o_layout));
-e_icon_file_get(tmp, &file, &group);
-eina_stringshare_replace(&ic->icon, file);
-eina_stringshare_replace(&ic->key, group);
-path = ic->icon;
-k = ic->key;
+if (isedje(tmp))
+  {
+ edje_object_file_get(tmp, &file, &group);
+ if (file && group)
+   ret = EINA_TRUE;
+  }
+else
+  ret = e_icon_file_get(tmp, &file, &group);
+if (ret)
+  {
+ eina_stringshare_replace(&ic->icon, file);
+ eina_stringshare_replace(&ic->key, group);
+ path = ic->icon;
+ k = ic->key;
+  }
 evas_object_del(tmp);
  }
elm_image_file_set(ic->o_icon, path, k);

-- 




[EGIT] [core/efl] master 01/01: elput - use vpath to get xdg runtime to also be setuid safe

2017-02-08 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8e959890e732587bf73a09a214ca9bb984e9c623

commit 8e959890e732587bf73a09a214ca9bb984e9c623
Author: Carsten Haitzler (Rasterman) 
Date:   Thu Feb 9 09:27:41 2017 +0900

elput - use vpath to get xdg runtime to also be setuid safe

this time around... use a / at the end of the (:run:) virtual dir
path to make it work.
---
 src/lib/elput/elput_evdev.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index a83ebc1..8067f24 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,16 +60,19 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat 
*seat)
 static int
 _keyboard_fd_get(off_t size)
 {
+   const char *path;
+   Eina_Tmpstr *fullname;
+   long flags;
int fd = 0;
-   char *path;
char tmp[PATH_MAX];
-   long flags;
-   Eina_Tmpstr *fullname;
-
-   if (!(path = getenv("XDG_RUNTIME_DIR")))
- return -1;
+   Efl_Vpath_File *file_obj;
 
+   file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/");
+   efl_vpath_file_do(file_obj);
+   efl_vpath_file_wait(file_obj);
+   path = efl_vpath_file_result_get(file_obj);
snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XX", path);
+   efl_del(file_obj);
 
fd = eina_file_mkstemp(tmp, &fullname);
if (fd < 0) return -1;

-- 




Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread The Rasterman
On Wed, 8 Feb 2017 15:12:56 +0100 Stefan Schmidt  said:

> Hello.
> 
> On 07/02/17 10:37, Carsten Haitzler (The Rasterman) wrote:
> > On Tue, 7 Feb 2017 18:25:58 +1030 Simon Lees  said:
> >
> >>
> >>
> >> On 02/06/2017 10:06 PM, Gustavo Sverzut Barbieri wrote:
> >>>
> >>> Time-based releases keep the expectations if they are followed. Once
> >>> we miss the frame, we start to have this feature-based releases ("oh,
> >>> waited so long, can wait a bit more") and when people work
> >>> independently, they always have some in-flux work that could get in...
> >>> so at some point these guys will want to delay a bit more so their
> >>> work gets in as well... endless wait -- AKA e17/efl-1.0
> >>>
> >>> IOW: just do it, and let's not miss the 3 month schedule next time. ;-)
> >>>
> >>>
> >>
> >> The problem is people (even some in Samsung) are writing software that
> >> depends on unstable eo, regardless of whether its wrong or right its
> >> happening. This means that every release there is an extra bunch of work
> >> for downstream projects to roll another release and then for distro's to
> >> package all theses changes.
> 
> What are the offending packages you have to deal with here? As far as I 
> know it neither Enlightenment nor Termonology nor Rage is using any EO 
> based API.
> 
> They only ones I know of are developer tools like Edi, Eventor and 
> Efleete. Are these packaged in OpenSUSE?

those are the ones. especially eflete and enventor.

> >> Until the eo interfaces are done the cost of releasing is high, so
> >> releasing every 3 months for release sake when there isn't many new
> >> features such as the last release of last year that didn't happen
> >> doesn't make sense.
> >>
> >> If we are now at a point where there is significant new things then lets
> >> release now, if there is more significant new things in 3 months lets
> >> release again then, if there is no new things in 3 months releasing
> >> again then probably also doesn't make sense.
> 
> Its not 3 months this time either. Even when we start 1.19 stabilization 
> now it would be almost 6 months between 1.18 and 1.19.
> Its not like I would not listen and speed along.
> 
> >> So in short, if we want to go back to 3 monthly releases lets get eo
> >> interfaces done so releases stop being as much effort for a bunch of
> >> people.
> 
> It is just not a simple task. Its _huge_ and the last time we tried to 
> estimate it and execute it in the estimated timeframe we failed. We all 
> want to get it out but it takes time.
> 
> >> Cheers, from the guy who gets to deal with the mess at the other end.
> 
> I'm sorry for that. Remember the times where we had no releases at all 
> and people tried to package our software. It could have broken with 
> every commit. :) My feeling is that we on the right track even if 
> eo/intf makes more trouble than we imagined.  :(

well tbh - the problem here is depending on an officially unstable api. we have
done all the right things to warn people away from it and "hide it" without
some explicit efforts to override that hiding.

it could be argued that those apps just shouldn't be packaged or distributed
until eo+interfaces is stable and they have also caught up with the changes
too. if you choose to distribute, you get to also hold the bag when things go
wrong. im very tempted to take that stance on this.

> > that is a very good point. the reliance on eo anyway... and thus a 1.19 will
> > mean everything that did (wrongly) rely on it has to update/rev and release
> > too.
> 
> That was the case for various former releases as well. It is a pain for 
> people like Simon I fully understand this, but it is nothing new for 1.19.

it is indeed nothing new, BUT it is a factor. a pain factor. the question is...
is it enough of one to say "wait on release"?

i'd REALLY like to keep our stabilization cycle as short as we can manage so it
doesn't impact finishing off interfaces.

yes we can argue that "that work can happen in branches" but that then violates
the whole idea of stabilization. the POINT is for everyone to stop (well over a
few days/week) their current work, go back over work they AND others have done,
and fix bugs. look at what coverity has to say. look at any compiler warnings.
look at bug tickets. look for bugs. test. run make check... repeat until we are
in "good shape". :) a release means asking people to do this (and EXPECTING
them to).

> regards
> Stefan Schmidt
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterma

Re: [E-devel] Fixing Coverity Issues (Re: [EGIT] [core/efl] master 02/02: Revert "elput - use vpath to get xdg runtime to also be setuid safe")

2017-02-08 Thread The Rasterman
On Wed, 08 Feb 2017 16:00:06 + Mike Blumenkrantz
 said:

> Hi,
> 
> We've had threads and discussions about blindly pushing fixes for Coverity
> issues before, and it seemed to me that the consensus was we should stop

this wasn't blind. see below.

> engaging in such risky behaviors and only focus on issues in areas that we
> directly work on and are actively testing. It's easy enough to make

this i consider a bigger issue as its a security issue for setuid apps. it's
actually rather critical. thus i consider the importance of fixing such things
high up the priority list. there is yet more to fix still...

> mistakes while contributing ordinary untested code, but it seems to be a
> pattern that more mistakes are made when contributing untested code in
> unfamiliar areas.
> 
> Let's try to work more collaboratively on these and notify the people who
> work on the corresponding components when we're working on fixes for them.

i was in general hunting for getenv's for XDG_RUNTIME_DIR because this is one
of those env vars that's unsafe to use in a setuid app. coverity happened to
be pointing at this too (it was after coverity pointed to a few other places
that i started grep -r XDG_RUNTIME_DIR in our code). if anything relies on it
in a setuid app then it's in for a huge amount of trouble. there are still more
places like this too in our code i have to hunt.

that should not have broken though... it gets xdg_runtime from vpath... and
that should be using the env var UNLESS it's a setuid app and THEN its totally
unsafe to use the env var...

i read the code - the ONLY place in elput that dealt with that tmp file is
right there... so it SHOULD have made zero difference even where it was placed
as that filename is a tmpfile thus no code outside of that function should even
know what it is (it's not as "well known named file"), and the only thing it
exposes is an fd - so it could use memfd and not even a real file... i read the
code before and saw no good reason this shouldn't work just fine.
"collaborating" would have done nothing to help. there already is notification
- git commits list. it's automated.

regardless the code is now back to "setuid unsafe". so never ever ever use
elput in any setuid binary.

so i get that you are annoyed, but maybe just read git commits list? cedric
pushed/approved a patch that dropped everything in sw engine in evas to like 5
to 10fps yesterday. should he have notified everyone about his change to evas
and "collaborated"?

git commits list is there for notification of things being done to various
components. if its a big and/or extensive and controversial change - yeah.
discuss. this is not that. it's changing the source of an env var in a few
lines of code in a single commit.

the issue is i just forgot the / after the vpath string. just the / -
everything else was just fine. testing is hard as the only test box i have at
the office is my old gen 1 i5 and that is a "wait an hour for it to sync files
over and build" and i thought what i did was low risk as it was correct. it was
wrong. by one character.

> On Wed, Feb 8, 2017 at 10:50 AM Derek Foreman 
> wrote:
> 
> > derekf pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=62a22fd401128affb4f9bdca6d6db35a90dd6e19
> >
> > commit 62a22fd401128affb4f9bdca6d6db35a90dd6e19
> > Author: Derek Foreman 
> > Date:   Wed Feb 8 09:37:49 2017 -0600
> >
> > Revert "elput - use vpath to get xdg runtime to also be setuid safe"
> >
> > This reverts commit 24e34e19a1db84cdcb6241207cb99d14ca83c41b.
> >
> > This broke keyboard input for the enlightenment wayland compositor,
> > please test elput changes on at least one of the drm backends,
> > preferably with enlightenment.
> >
> > The wayland compositor is hard enough to keep stable due to breakage
> > from core changes only tested on X - but elput's main user is our
> > wayland compositor, was this tested anywhere?
> > ---
> >  src/lib/elput/elput_evdev.c | 15 ++-
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
> > index 028bf62..a83ebc1 100644
> > --- a/src/lib/elput/elput_evdev.c
> > +++ b/src/lib/elput/elput_evdev.c
> > @@ -60,19 +60,16 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd,
> > Elput_Seat *seat)
> >  static int
> >  _keyboard_fd_get(off_t size)
> >  {
> > -   const char *path;
> > -   Eina_Tmpstr *fullname;
> > -   long flags;
> > int fd = 0;
> > +   char *path;
> > char tmp[PATH_MAX];
> > +   long flags;
> > +   Eina_Tmpstr *fullname;
> > +
> > +   if (!(path = getenv("XDG_RUNTIME_DIR")))
> > + return -1;
> >
> > -   Efl_Vpath_File *file_obj =
> > - efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)");
> > -   efl_vpath_file_do(file_obj);
> > -   efl_vpath_file_wait(file_obj);
> > -   path = efl_vpath_file_result_get(file_obj);
> > snprintf(tmp, sizeof(tmp), "%s/elput-keym

[EGIT] [core/efl] master 01/01: evas: Fix invalid current state (invalid bool value)

2017-02-08 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2a239c211cfe8dd01ddb620fcc8866dc43cb0be1

commit 2a239c211cfe8dd01ddb620fcc8866dc43cb0be1
Author: Jean-Philippe Andre 
Date:   Thu Feb 9 11:34:29 2017 +0900

evas: Fix invalid current state (invalid bool value)

newframe() resets some of the gl context properties, so match them
to our shadow copy in the gc state.

target_surface_set() also resets some of those properties but only
in our shadow copy, not in the actual GL context. As a consequence
we can't rely on setting a bool to 0 or 1 unless we also call the
equivalent GL function. Expand bitfields to 2 bits allows us to
set a bool to the invalid value of -1 (yes, that's not a real bool).

Also there is no need to reset the target surface to NULL during
newframe. It will be reset during target_surface_set.

This fixes some issues I encounter while working on GL filters.
---
 src/modules/evas/engines/gl_common/evas_gl_common.h  | 8 
 src/modules/evas/engines/gl_common/evas_gl_context.c | 7 ---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h 
b/src/modules/evas/engines/gl_common/evas_gl_common.h
index dc8ccd6..67d10cd 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -264,10 +264,10 @@ struct _Evas_Engine_GL_Context
  int tex_target;
  int cx, cy, cw, ch;
  unsigned char   render_op;
- Eina_Bool   smooth : 1;
- Eina_Bool   blend  : 1;
- Eina_Bool   clip   : 1;
- Eina_Bool   anti_alias : 1;
+ Eina_Bool   smooth : 2;
+ Eina_Bool   blend  : 2;
+ Eina_Bool   clip   : 2;
+ Eina_Bool   anti_alias : 2;
   } current;
} state;
 
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 79b1bc1..602dac4 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -1440,7 +1440,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context 
*gc)
gc->state.current.cur_texa = 0;
gc->state.current.cur_texm = 0;
gc->state.current.tex_target = GL_TEXTURE_2D;
-   gc->state.current.render_op = 0;
+   gc->state.current.render_op = EVAS_RENDER_COPY;
gc->state.current.smooth = 0;
gc->state.current.blend = 0;
gc->state.current.clip = 0;
@@ -1456,7 +1456,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context 
*gc)
 gc->pipe[i].region.w = 0;
 gc->pipe[i].region.h = 0;
 gc->pipe[i].region.type = 0;
-gc->pipe[i].shader.surface = NULL;
+//gc->pipe[i].shader.surface = NULL;
 gc->pipe[i].shader.prog = NULL;
 gc->pipe[i].shader.cur_tex = 0;
 gc->pipe[i].shader.cur_texu = 0;
@@ -1464,7 +1464,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context 
*gc)
 gc->pipe[i].shader.cur_texa = 0;
 gc->pipe[i].shader.cur_texm = 0;
 gc->pipe[i].shader.tex_target = GL_TEXTURE_2D;
-gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND;
+gc->pipe[i].shader.render_op = EVAS_RENDER_COPY;
 gc->pipe[i].shader.smooth = 0;
 gc->pipe[i].shader.blend = 0;
 gc->pipe[i].shader.clip = 0;
@@ -1596,6 +1596,7 @@ 
evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
gc->state.current.cy = -1;
gc->state.current.cw = -1;
gc->state.current.ch = -1;
+   gc->state.current.anti_alias = -1;
 
gc->pipe[0].shader.surface = surface;
gc->change.size = 1;

-- 




Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Simon Lees


On 02/08/2017 11:59 PM, Felipe Magno de Almeida wrote:
> I don't get the reluctance on releasing now. IMO, if we stop releasing
> in a timely fashion, EFL will become full of bugs again. EFL was
> becoming quite stable with the releases that Stefan has been managing.
> If we start questioning the releases, we will always find reasons why
> not to release now. But the benefits of releasing often and with
> predictable periods have proven to be big IMO.
> 

To be clear, i'm not against releasing now I think its probably a good
idea, I was more against releasing 3 months back, when know one could
tell me of any new features outside wayland (bug fixes don't count as
they should be backported anyway). Similarly if there's not anything of
note and eo interfaces still aren't done 2 months after the next release
i'll again question if we should wait a bit longer again. Once eo is
stable then everything will be easy again and we should go back to 3
months.

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE Linux   Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Schedule discussion for 1.19

2017-02-08 Thread Simon Lees


On 02/09/2017 12:42 AM, Stefan Schmidt wrote:
> Hello.
> 
> On 07/02/17 10:37, Carsten Haitzler (The Rasterman) wrote:
>> On Tue, 7 Feb 2017 18:25:58 +1030 Simon Lees  said:
>>
>>>
>>>
>>> On 02/06/2017 10:06 PM, Gustavo Sverzut Barbieri wrote:

 Time-based releases keep the expectations if they are followed. Once
 we miss the frame, we start to have this feature-based releases ("oh,
 waited so long, can wait a bit more") and when people work
 independently, they always have some in-flux work that could get in...
 so at some point these guys will want to delay a bit more so their
 work gets in as well... endless wait -- AKA e17/efl-1.0

 IOW: just do it, and let's not miss the 3 month schedule next time. ;-)


>>>
>>> The problem is people (even some in Samsung) are writing software that
>>> depends on unstable eo, regardless of whether its wrong or right its
>>> happening. This means that every release there is an extra bunch of work
>>> for downstream projects to roll another release and then for distro's to
>>> package all theses changes.
> 
> What are the offending packages you have to deal with here? As far as I 
> know it neither Enlightenment nor Termonology nor Rage is using any EO 
> based API.
> 
> They only ones I know of are developer tools like Edi, Eventor and 
> Efleete. Are these packaged in OpenSUSE?
> 

These are the main ones, there packaged but not in the main repo's and
won't be until eo is stable. I held of packaging them at all for a long
time but every indication was given that interfaces would be done for
1.18 and I wanted to try them so I built packages. I can't remember if
ephoto also does, but I have test packages based off its last beta so if
it does it would probably also need another beta. efm/verne/jesus also
does but i'm only building that from git snapshots anyway so its less of
an issue.

In short really the people already using eo and those that want the
regular 3 month releases back to a lesser extent really need to pitch in
and get the work finished.

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE Linux   Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel