Re: [E-devel] What do you think of Vala?

2016-12-07 Thread The Rasterman
On Wed, 7 Dec 2016 15:11:27 +0900 Jean-Philippe André  said:

> Hey Conr2d,
> 
> On 6 December 2016 at 13:33, Conrad Um  wrote:
> 
> > Dear friends,
> >
> > I'm a big fan of vala (if you don't know what vala is, please see this link
> > ), and writing a vala binding
> > generator for EFL.
> >
> > Vala has a syntax similar to C# and has managed feature based on reference
> > counting, but basically it just converts .vala files to .c files to compile
> > them with gcc and gobject library.
> >
> > My experimental generator can create VAPI files for having vala recognize C
> > APIs, but only support compact class type which is not a full-featured vala
> > class type.
> > (Because complete vala class is based on gobject system. You can see the
> > difference of compact and complete class here
> >  > eType.5D_and_.5BCompact.5D_in_bindings_mean.3F>
> > .)
> > If I want to use all features supported in vala, I should make a wrapper
> > class like in eolian_cxx.
> >
> > By the way, it comes to my mind that makes vala generate c code based on eo
> > instead of gobject. It can be used by application developers, but I think
> > even EFL developers can write libraries with modern language.
> >
> > Currently, we should write 2 files (.c and .eo) per class at least.
> > However, vala with eo backend only requires 1 vala file.
> >
> > For example,
> >
> > public class Elm.Button : Elm.Layout, Efl.Ui.Clickable,
> > Elm.Interface.Atspi_Widget_Action
> > {
> >/* elm_widget_button.h, contents of private header */
> >private double ar_initial_timeout;
> >private double ar_gap_timeout;
> >private Ecore.Timer? timer; // question mark means nullable
> >private bool repeating;
> >
> >/* events */
> >public signal void clicked();
> >public signal void repeated();
> >
> >/* elm_button.c, property setter/getter body */
> >public bool autorepeat {
> >   set {
> >  timer = null; // To assign null to 'timer' will unref timer.
> >  autorepeat = value;
> >  repeating = false;
> >   }
> >   get {
> >  return autorepeat & admits_autorepeat;
> >}
> >}
> >
> >/* elm_button.c, private function body */
> >private void activate() {
> >   timer = null;
> >   repeating = false;
> >   /* if property getter is set, the next condition will be (!disabled
> > && !freeze_events) */
> >   if (!disabled_get() && !freeze_events_get())
> >  clicked(); // invokes callbacks for "clicked" events
> >}
> >
> >/* elm_button.c, override Efl.Canvas.Group.group_add() */
> >public override group_add() {
> >   base.group_add(); // efl_super
> >   sub_object_parent_add();
> >
> >   /* lambda expression */
> >   resize_obj.signal_callback_add("elm,action,click", "*", (emission,
> > source) =>
> >   {
> >  activate();
> >   });
> >
> >   access_object_register(resize_obj);
> >   can_focus_set(true);
> >
> >   theme_set("button", "base", style_get());
> >}
> >...
> > }
> >
> > With vala file like above, valac (vala compiler) with eo backend will be
> > able to generate several files we need. (public header, private header, c
> > file including .c and .eo.c contents)
> > Moreover, header and c files generated by valac are simple c source files,
> > so they can be compiled with existing code or c file written in c from the
> > beginning (not generated).
> > I know all EFL developers are C expert, and you may never feel need of
> > redundant tools except for C. However I think if you want EFL to advance
> > further and continuously, we should investigate how we can adapt modern
> > concepts, knowledge and ideas on our works.
> >
> > It's just a suggestion, but if there is any one interested in this idea, we
> > can start new project for the future. :D
> >
> 
> I was wondering when you would go public with your idea :)
> Will you publish your current code somewhere? You have a private repo on
> git.e.org.
> 
> I think this is really cool as it seems to generate a (almost?)
> zero-overhead binding in a friendly language.
> I know nothing about C# or Vala, although I know they only look similar,
> they are not the same language.
> 
> I doubt we would use this inside the EFL codebase itself but I can
> definitely see the value in a new language binding.
> 
> If only the EFL interfaces could be completed already...

that's basically what's standing in the way at the moment. :)

I agree. I personally have no opinion on either C# or Vala (I hear C# is a
better Java... I do have negative opinions of java due to bad run-ins with Java
in the past, but being better... ok. Mind is open). I hear good things about
Vala too, but I have also no experience with it. It's clean and simple in that
it compiles down to C from Vala and thus just acts as a piggyback on your
existing native compiler. Fine.

From 

[EGIT] [core/efl] master 01/01: evas - software generic - fix crash when buffer is freed when its the same

2016-12-07 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit fcef8d8392b8c8d1d7b96baacaf5e7e89fcf6b45
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Dec 7 19:24:44 2016 +0900

evas - software generic - fix crash when buffer is freed when its the same

evas_render_engine_software_generic_update(0 definitely is wrong where
it wants to always free the outbuf even if the buffer passed in is the
same one and thus it ends up being freed and now invalid. fix it

@fix
---
 .../evas/engines/software_generic/Evas_Engine_Software_Generic.h   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index b716b6b..59537c9 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -177,8 +177,11 @@ 
evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
Outbuf *ob,
int w, int h)
 {
-   if (re->ob) re->outbuf_free(re->ob);
-   re->ob = ob;
+   if ((re->ob) && (re->ob != ob))
+ {
+re->outbuf_free(re->ob);
+re->ob = ob;
+ }
 
evas_common_tilebuf_free(re->tb);
re->tb = evas_common_tilebuf_new(w, h);

-- 




Re: [E-devel] [EGIT] [core/efl] master 05/08: efl: extend possible error while decoding an image to be cancelled.

2016-12-07 Thread Gustavo Sverzut Barbieri
On Wed, Dec 7, 2016 at 2:21 AM, Cedric BAIL  wrote:
> On Dec 6, 2016 17:25, "Gustavo Sverzut Barbieri"  wrote:
>
> On Tue, Dec 6, 2016 at 10:34 PM, Cedric BAIL  wrote:
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=
> 889944fefef45ee9d715656427d6f1c523ec9867
>>
>> commit 889944fefef45ee9d715656427d6f1c523ec9867
>> Author: Cedric BAIL 
>> Date:   Tue Dec 6 16:22:11 2016 -0800
>>
>> efl: extend possible error while decoding an image to be cancelled.
>
> why not use Eina_Error for that, then you register your new types...
> things like permission denied and resource allocation failed are
> already defined in errno.h
>
>
> Mostly history as they are exposed already in some of our legacy API. The
> alternate is to convert them in the legacy API, but I didn't like that idea.

why not? converting between integers is easy, if it's common we can
even declared this in the .eo and generate the legacy as well, or
simply declare a table in .c and ask for translation (simple for
loop).

it's always a pain to deal with errors, you don't know which value,
you don't know how to convert them to string for debug, or exception
in Python...

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] efl_net_local_fallback (win32 and possibly others)

2016-12-07 Thread Gustavo Sverzut Barbieri
On Wed, Dec 7, 2016 at 3:52 AM, Vincent Torri  wrote:
> and fyi, ecore_con_local_win32 used to work before the migration to
> eo. I tested it with a client/server, efreetd also was working

I guess one day it may have worked, but It's not now... I didn't
investigate the whole set of changes to that file, it seems pretty
isolated as it doesn't deal much with eo on its own.

Then come to your other reply:


> On Wed, Dec 7, 2016 at 6:50 AM, Vincent Torri  wrote:
>> On Wed, Dec 7, 2016 at 12:50 AM, Gustavo Sverzut Barbieri
>>  wrote:
>>> Hi all,
>>>
>>> It seems ECORE_CON_LOCAL_* is broken on Windows given reports on
>>> efreetd not working there, the code is very different from other
>>> protocols, see ecore_con_local_win32.c
>>>
>>> Since I will replace Ecore_Con_Server with a wrapper on top of
>>> Efl_Net, I'm wondering what to do... I don't have a windows machine or
>>> windows development environment to write a new Efl_Net set of class
>>> for it (if you do, please talk to me so I can get an SSH access).
>>>
>>> More than that, looking at local_win32.c I wonder how that would work,
>>> since unlike UNIX path, it doesn't encode the service name/port in the
>>> path, but the process id (I guess it's like the PID), thus one process
>>> won't find the other...
>>>
>>> That's to say that legacy compatibility is not an issue in that case.
>>>
>>> Then what I propose to write an Efl_Net_Local_Fallback that uses a
>>> local path to encode a localhost (127.0.0.1) TCP port. Then the logic
>>> would be:
>>>
>>>   - server: bind(127.0.0.1:0), getsockname() to check the port,
>>> fprintf(fp, "%hu\n", ntohs(addr.sin_port))... \n is used to avoid
>>> partial writes (unlikely) to file.
>>>
>>>  - dialer (client): fopen() + fread() + verify trailing \n, then
>>> connect to 127.0.0.1:$port
>>>
>>>  - path is encoded like in UNIX, just "/" is replaced with "\" for
>>> windows. "~" is also handled like in Windows, such as User\username...
>>>
>>> Then it would provide some usable solution where a native local
>>> communication is not available... Of course this is fully testable on
>>> UNIX as well, then we don't rely on Windows to test it.
>>>
>>> Agreed?
>>
>> no.
>>
>> named pipes are used. The name of a named pipe must have the following
>> scheme : \\.\pipe\mypipename on  local computer (or
>> \\servername\pipe\mypipename on a remote computer)
>>
>> you keep thinking that unix and windows are the same...

I don't think that, but I try to understand what code does, not solely
hope it would work or complain without offering something insightful
in exchange.

Look at this code, which I isolated in its own function, now a new API
to return the path (code itself is not modified):
https://git.enlightenment.org/core/efl.git/tree/src/lib/ecore_con/ecore_con_local_win32.c#n390

   if (!is_system)
 snprintf(buf, sizeof(buf), ".\\pipe\\%s%ld", name,
GetProcessId(GetCurrentProcess()));
   else
 {
const char *computername;

computername = getenv("COMPUTERNAME");
snprintf(buf, sizeof(buf), "%s\\pipe\\%s%ld",
computername, name, GetProcessId(GetCurrentProcess()));
 }

I know nothing about Windows, but I know how to read code and read
docs, then I search what is GetProcessId():
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683215(v=vs.85).aspx

Retrieves the process identifier of the specified process

It should be using a delimiter and then "port", as other code does,
since you use $PID, then how is one process going to find the other if
it doesn't know the process id of the server?

Since I'm proposing a FALLBACK system, I'd not use the same path as
the actual implementation may use as it would clash. Instead I'd use
another file, named closely to UNIX.

Read my first email, this is a FALLBACK system that uses a FILE to
indicate the TCP port on localhost, it's NOT using the
CreateNamedPipe().

There are two purposes in this:
 - offer a fallback where a native local transport is not available
(Windows, PlayStation, etc)
 - create a code that is testable and debugable on UNIX, where most
developers work.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/02: Eo gdb: Implement eo_data_get to get eo data.

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 5614e46f1f01aa02a779358177907fc08223f3ac
Author: Tom Hacohen 
Date:   Wed Dec 7 12:33:59 2016 +

Eo gdb: Implement eo_data_get to get eo data.

Like 79d76fb25ece4ffbf5785b4be2b030f062ef9f2c, this is useful when
debugging a core dump.

It accepts a valid pointer to an object, for example as returned from
$eo_resolve, and a name of a class or mixin, and returns a pointer to
the private data. Essentially the same as efl_data_scope_get(), but also
works on core dumps, and accepts a class name instead of a class
pointer.

Usage:
Print the pointer:
 (gdb) print $eo_data_get($eo_resolve(obj), "Efl_Canvas_Object")
 $1 = (void *) 0x55eb9290

Use it directly (e.g. to print a value):
 (gdb) print ((Evas_Object_Protected_Data *) $eo_data_get($eo_resolve(obj),
  "Efl_Canvas_Object"))->last_event_type
 $2 = EVAS_CALLBACK_MOUSE_UP

@feature
---
 data/eo/eo_gdb.py | 49 +
 1 file changed, 49 insertions(+)

diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index 76b8fbd..ec4d21c 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -93,3 +93,52 @@ class Eo_resolve(gdb.Function):
 
 
 Eo_resolve()
+
+
+class Eo_data_get(gdb.Function):
+def __init__(self):
+gdb.Function.__init__(self, 'eo_data_get')
+
+def invoke(self, ptr, kls_name):
+ptr = ptr.cast(null_ptr.type)  # Make sure it's the right type
+
+if int(ptr) == 0:
+gdb.write('Object is not a valid pointer (NULL).\n')
+return null_ptr
+
+kls_name = kls_name.string()
+extns = ptr['klass']['mro']
+kls = None
+
+i = 0
+while int(extns[i]) != 0:
+if extns[i]['desc']['name'].string() == kls_name:
+kls = extns[i]
+i += 1
+
+if kls is None:
+gdb.write('Class "{}" not found in the object mro.\n'
+  .format(kls_name))
+return null_ptr
+
+# Check if not mixin
+if int(kls['desc']['type']) != 3:
+return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
+  .format(ptr, kls['data_offset']))
+else:
+extn_off = ptr['klass']['extn_data_off']
+if int(extn_off) == 0:
+return null_ptr
+
+i = 0
+while int(extn_off[i]['klass']) != 0:
+kls = extn_off[i]['klass']
+if kls['desc']['name'].string() == kls_name:
+return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
+  .format(ptr, kls['data_offset']))
+i += 1
+
+return null_ptr
+
+
+Eo_data_get()

-- 




[EGIT] [core/efl] master 02/02: Eo gdb: Be more strict with types and convert Eo * to uintptr_t.

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit ddf940320dba33e9b3e52aa5ba4ddc1b8ca1c499
Author: Tom Hacohen 
Date:   Wed Dec 7 12:50:52 2016 +

Eo gdb: Be more strict with types and convert Eo * to uintptr_t.

This should make the results cleaner and also solve potential conversion
issues in some version combinations of gdb and python.
---
 data/eo/eo_gdb.py | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index ec4d21c..e02dd10 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -56,7 +56,9 @@ MASK_GENERATIONS = (MAX_GENERATIONS - 1)
 MASK_OBJ_TAG = (1 << (REF_TAG_SHIFT))
 
 
-null_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+null_void_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+null_eo_object_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+zero_uintptr_t = gdb.parse_and_eval('(uintptr_t) 0')
 
 
 class Eo_resolve(gdb.Function):
@@ -64,7 +66,7 @@ class Eo_resolve(gdb.Function):
 gdb.Function.__init__(self, 'eo_resolve')
 
 def invoke(self, arg):
-obj_id = int(arg)
+obj_id = int(arg.cast(zero_uintptr_t.type))
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID
@@ -74,20 +76,20 @@ class Eo_resolve(gdb.Function):
 
 if (obj_id == 0) or (tag_bit == 0):
 gdb.write('Pointer is NULL or not a valid object.\n')
-return null_ptr
+return null_eo_object_ptr
 
 entries = gdb.parse_and_eval('_eo_gdb_main_domain->tables[0]->' +
  'eo_ids_tables[{0}]'.format(mid_table_id))
 
 if int(entries) == 0:
 gdb.write('Pointer is not a valid object.\n')
-return null_ptr
+return null_eo_object_ptr
 
 entry = entries[table_id]['entries'][entry_id]
 
 if (not entry['active']) or (int(entry['generation']) != generation):
 gdb.write('Pointer is no longer active.\n')
-return null_ptr
+return null_eo_object_ptr
 
 return entry['ptr']
 
@@ -100,11 +102,11 @@ class Eo_data_get(gdb.Function):
 gdb.Function.__init__(self, 'eo_data_get')
 
 def invoke(self, ptr, kls_name):
-ptr = ptr.cast(null_ptr.type)  # Make sure it's the right type
+ptr = ptr.cast(null_eo_object_ptr.type)  # Cast to correct type
 
 if int(ptr) == 0:
 gdb.write('Object is not a valid pointer (NULL).\n')
-return null_ptr
+return null_void_ptr
 
 kls_name = kls_name.string()
 extns = ptr['klass']['mro']
@@ -119,7 +121,7 @@ class Eo_data_get(gdb.Function):
 if kls is None:
 gdb.write('Class "{}" not found in the object mro.\n'
   .format(kls_name))
-return null_ptr
+return null_void_ptr
 
 # Check if not mixin
 if int(kls['desc']['type']) != 3:
@@ -128,7 +130,7 @@ class Eo_data_get(gdb.Function):
 else:
 extn_off = ptr['klass']['extn_data_off']
 if int(extn_off) == 0:
-return null_ptr
+return null_void_ptr
 
 i = 0
 while int(extn_off[i]['klass']) != 0:
@@ -138,7 +140,7 @@ class Eo_data_get(gdb.Function):
   .format(ptr, kls['data_offset']))
 i += 1
 
-return null_ptr
+return null_void_ptr
 
 
 Eo_data_get()

-- 




[EGIT] [core/efl] master 01/01: eolian: switch reference validation to new tokenizer

2016-12-07 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 5fa81d9fabc82485949416e4437ec79a77676537
Author: Daniel Kolesa 
Date:   Wed Dec 7 13:55:56 2016 +0100

eolian: switch reference validation to new tokenizer
---
 src/lib/eolian/database_validate.c | 115 +++--
 1 file changed, 20 insertions(+), 95 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index bc93a57..81f399f 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -7,107 +7,32 @@
 #include "eo_lexer.h"
 
 static Eina_Bool
-_validate_ref(const char *ref, const Eolian_Object *info)
-{
-   if (eolian_declaration_get_by_name(ref))
- return EINA_TRUE;
-
-   const char *suffix = strrchr(ref, '.');
-   if (!suffix) goto failed;
-
-   Eina_Stringshare *base = eina_stringshare_add_length(ref, suffix - ref);
-
-   const Eolian_Typedecl *tpd = eolian_typedecl_struct_get_by_name(base);
-   if (tpd)
- {
-eina_stringshare_del(base);
-if (!eolian_typedecl_struct_field_get(tpd, suffix + 1))
-  goto failed;
-return EINA_TRUE;
- }
-
-   tpd = eolian_typedecl_enum_get_by_name(base);
-   if (tpd)
- {
-eina_stringshare_del(base);
-if (!eolian_typedecl_enum_field_get(tpd, suffix + 1))
-  goto failed;
-return EINA_TRUE;
- }
-
-   const Eolian_Class *cl = eolian_class_get_by_name(base);
-   if (cl)
- {
-eina_stringshare_del(base);
-if (!eolian_class_function_get_by_name(cl, suffix + 1, 
EOLIAN_UNRESOLVED))
-  goto failed;
-return EINA_TRUE;
- }
-
-   Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
-   if (!strcmp(suffix, ".get"))
- ftype = EOLIAN_PROP_GET;
-   else if (!strcmp(suffix, ".set"))
- ftype = EOLIAN_PROP_SET;
-
-   const char *meth;
-   if (ftype != EOLIAN_UNRESOLVED)
- {
-eina_stringshare_del(base);
-meth = suffix - 1;
-while ((meth != ref) && (*meth != '.')) --meth;
-if (meth == ref) goto failed;
-base = eina_stringshare_add_length(ref, meth - ref);
-cl = eolian_class_get_by_name(base);
-eina_stringshare_del(base);
- }
-
-   if (!cl) goto failed;
-
-   char *ameth = strndup(meth + 1, suffix - meth - 1);
-   const Eolian_Function *fn = eolian_class_function_get_by_name(cl, ameth, 
ftype);
-   free(ameth);
-
-   if (!fn) goto failed;
-   return EINA_TRUE;
-
-failed:
-   fprintf(stderr, "eolian:%s:%d:%d: failed validating reference '%s'\n",
-   info->file, info->line, info->column, ref);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
 _validate_docstr(Eina_Stringshare *str, const Eolian_Object *info)
 {
-   if (!str) return EINA_TRUE;
+   if (!str || !str[0]) return EINA_TRUE;
 
-   const char *p;
-   for (p = strchr(str, '@'); p; p = strchr(p, '@'))
+   Eina_Bool ret = EINA_TRUE;
+   Eina_List *pl = eolian_documentation_string_split(str);
+   char *par;
+   EINA_LIST_FREE(pl, par)
  {
-++p;
-/* escaped refs */
-if ((p > (str + 1)) && (*(p - 2) == '\\'))
-  continue;
-/* are we starting a reference? */
-const char *ref = p;
-if (!isalpha(*p) && (*p != '_'))
-  continue;
-++p;
-/* check the rest of the reference */
-while (isalnum(*p) || (*p == '.') || (*p == '_'))
-  ++p;
-if (*(p - 1) == '.') --p;
-Eina_Stringshare *refs = eina_stringshare_add_length(ref, (p - ref));
-if (!_validate_ref(refs, info))
-  {
- eina_stringshare_del(refs);
- return EINA_FALSE;
-  }
-eina_stringshare_del(refs);
+const char *doc = par;
+Eolian_Doc_Token tok;
+eolian_doc_token_init(&tok);
+while (ret && (doc = eolian_documentation_tokenize(doc, &tok)))
+  if (eolian_doc_token_type_get(&tok) == EOLIAN_DOC_TOKEN_REF)
+if (eolian_doc_token_ref_get(&tok, NULL, NULL) == 
EOLIAN_DOC_REF_INVALID)
+  {
+ char *refn = eolian_doc_token_text_get(&tok);
+ fprintf(stderr, "eolian:%s:%d:%d: failed validating reference 
'%s'\n",
+ info->file, info->line, info->column, refn);
+ free(refn);
+ ret = EINA_FALSE;
+ break;
+  }
  }
 
-   return EINA_TRUE;
+   return ret;
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] efl-1.16 02/02: Eo gdb: Be more strict with types and convert Eo * to uintptr_t.

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch efl-1.16.

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

commit 692276ad548eb6d00ffbc399c9af3226574342af
Author: Tom Hacohen 
Date:   Wed Dec 7 12:50:52 2016 +

Eo gdb: Be more strict with types and convert Eo * to uintptr_t.

This should make the results cleaner and also solve potential conversion
issues in some version combinations of gdb and python.
---
 data/eo/eo_gdb.py | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index 6a58a6c..f56be99 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -45,7 +45,9 @@ MASK_GENERATIONS = (MAX_GENERATIONS - 1)
 MASK_OBJ_TAG = (1 << (REF_TAG_SHIFT))
 
 
-null_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+null_void_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+null_eo_object_ptr = gdb.parse_and_eval('(_Eo_Object *) 0')
+zero_uintptr_t = gdb.parse_and_eval('(uintptr_t) 0')
 
 
 class Eo_resolve(gdb.Function):
@@ -53,7 +55,7 @@ class Eo_resolve(gdb.Function):
 gdb.Function.__init__(self, 'eo_resolve')
 
 def invoke(self, arg):
-obj_id = int(arg)
+obj_id = int(arg.cast(zero_uintptr_t.type))
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID
@@ -63,19 +65,19 @@ class Eo_resolve(gdb.Function):
 
 if (obj_id == 0) or (tag_bit == 0):
 gdb.write('Pointer is NULL or not a valid object.\n')
-return null_ptr
+return null_eo_object_ptr
 
 entries = 
gdb.parse_and_eval('_eo_ids_tables[{0}]'.format(mid_table_id))
 
 if int(entries) == 0:
 gdb.write('Pointer is not a valid object.\n')
-return null_ptr
+return null_eo_object_ptr
 
 entry = entries[table_id]['entries'][entry_id]
 
 if (not entry['active']) or (int(entry['generation']) != generation):
 gdb.write('Pointer is no longer active.\n')
-return null_ptr
+return null_eo_object_ptr
 
 return entry['ptr']
 
@@ -88,11 +90,11 @@ class Eo_data_get(gdb.Function):
 gdb.Function.__init__(self, 'eo_data_get')
 
 def invoke(self, ptr, kls_name):
-ptr = ptr.cast(null_ptr.type)  # Make sure it's the right type
+ptr = ptr.cast(null_eo_object_ptr.type)  # Cast to correct type
 
 if int(ptr) == 0:
 gdb.write('Object is not a valid pointer (NULL).\n')
-return null_ptr
+return null_void_ptr
 
 kls_name = kls_name.string()
 extns = ptr['klass']['mro']
@@ -107,7 +109,7 @@ class Eo_data_get(gdb.Function):
 if kls is None:
 gdb.write('Class "{}" not found in the object mro.\n'
   .format(kls_name))
-return null_ptr
+return null_void_ptr
 
 # Check if not mixin
 if int(kls['desc']['type']) != 3:
@@ -116,7 +118,7 @@ class Eo_data_get(gdb.Function):
 else:
 extn_off = ptr['klass']['extn_data_off']
 if int(extn_off) == 0:
-return null_ptr
+return null_void_ptr
 
 i = 0
 while int(extn_off[i]['klass']) != 0:
@@ -126,7 +128,7 @@ class Eo_data_get(gdb.Function):
   .format(ptr, kls['data_offset']))
 i += 1
 
-return null_ptr
+return null_void_ptr
 
 
 Eo_data_get()

-- 




[EGIT] [core/efl] efl-1.16 01/02: Eo gdb: Implement eo_data_get to get eo data.

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch efl-1.16.

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

commit 7492b67e65b48a7835c5fee671b181803a7e5896
Author: Tom Hacohen 
Date:   Wed Dec 7 12:33:59 2016 +

Eo gdb: Implement eo_data_get to get eo data.

Like 79d76fb25ece4ffbf5785b4be2b030f062ef9f2c, this is useful when
debugging a core dump.

It accepts a valid pointer to an object, for example as returned from
$eo_resolve, and a name of a class or mixin, and returns a pointer to
the private data. Essentially the same as efl_data_scope_get(), but also
works on core dumps, and accepts a class name instead of a class
pointer.

Usage:
Print the pointer:
 (gdb) print $eo_data_get($eo_resolve(obj), "Efl_Canvas_Object")
 $1 = (void *) 0x55eb9290

Use it directly (e.g. to print a value):
 (gdb) print ((Evas_Object_Protected_Data *) $eo_data_get($eo_resolve(obj),
  "Efl_Canvas_Object"))->last_event_type
 $2 = EVAS_CALLBACK_MOUSE_UP

@feature
---
 data/eo/eo_gdb.py | 49 +
 1 file changed, 49 insertions(+)

diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index e54797d..6a58a6c 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -81,3 +81,52 @@ class Eo_resolve(gdb.Function):
 
 
 Eo_resolve()
+
+
+class Eo_data_get(gdb.Function):
+def __init__(self):
+gdb.Function.__init__(self, 'eo_data_get')
+
+def invoke(self, ptr, kls_name):
+ptr = ptr.cast(null_ptr.type)  # Make sure it's the right type
+
+if int(ptr) == 0:
+gdb.write('Object is not a valid pointer (NULL).\n')
+return null_ptr
+
+kls_name = kls_name.string()
+extns = ptr['klass']['mro']
+kls = None
+
+i = 0
+while int(extns[i]) != 0:
+if extns[i]['desc']['name'].string() == kls_name:
+kls = extns[i]
+i += 1
+
+if kls is None:
+gdb.write('Class "{}" not found in the object mro.\n'
+  .format(kls_name))
+return null_ptr
+
+# Check if not mixin
+if int(kls['desc']['type']) != 3:
+return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
+  .format(ptr, kls['data_offset']))
+else:
+extn_off = ptr['klass']['extn_data_off']
+if int(extn_off) == 0:
+return null_ptr
+
+i = 0
+while int(extn_off[i]['klass']) != 0:
+kls = extn_off[i]['klass']
+if kls['desc']['name'].string() == kls_name:
+return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
+  .format(ptr, kls['data_offset']))
+i += 1
+
+return null_ptr
+
+
+Eo_data_get()

-- 




[EGIT] [core/efl] master 01/01: eolian: forgotten free() (leaks memory otherwise)

2016-12-07 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 246288fff76b7ca6f3887bc141856f66817ceeb9
Author: Daniel Kolesa 
Date:   Wed Dec 7 14:06:02 2016 +0100

eolian: forgotten free() (leaks memory otherwise)
---
 src/lib/eolian/database_validate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 81f399f..76c96d7 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -30,6 +30,7 @@ _validate_docstr(Eina_Stringshare *str, const Eolian_Object 
*info)
  ret = EINA_FALSE;
  break;
   }
+free(par);
  }
 
return ret;

-- 




[EGIT] [core/efl] master 02/02: Eo tests: Adjust according to latest commit.

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 900b1726e6c8205c8f6c9c74ffa6579e2c15809f
Author: Tom Hacohen 
Date:   Wed Dec 7 13:18:41 2016 +

Eo tests: Adjust according to latest commit.
---
 src/tests/eo/suite/eo_test_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tests/eo/suite/eo_test_init.c 
b/src/tests/eo/suite/eo_test_init.c
index 9bf0d9b..1f82be4 100644
--- a/src/tests/eo/suite/eo_test_init.c
+++ b/src/tests/eo/suite/eo_test_init.c
@@ -21,7 +21,7 @@ START_TEST(eo_test_init_shutdown)
Eo *obj;
 
fail_if(!efl_object_init());
-   ck_assert_str_eq("Efl_Object", efl_class_name_get(EFL_OBJECT_CLASS));
+   ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS));
 
/* XXX-1: Essential for the next test to assign the wrong op. */
obj = efl_add(SIMPLE_CLASS, NULL);
@@ -34,7 +34,7 @@ START_TEST(eo_test_init_shutdown)
fail_if(efl_object_shutdown());
 
fail_if(!efl_object_init());
-   ck_assert_str_eq("Efl_Object", efl_class_name_get(EFL_OBJECT_CLASS));
+   ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS));
 
/* XXX-1: Verify that the op was not cached. */
ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS));

-- 




[EGIT] [core/efl] master 01/02: eolian: use the generic class name instead of C name in source

2016-12-07 Thread Daniel Kolesa
tasn pushed a commit to branch master.

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

commit 8d4de0d7870be482cf5bb981ffca63e47fe4e1a9
Author: Daniel Kolesa 
Date:   Wed Dec 7 13:19:48 2016 +0100

eolian: use the generic class name instead of C name in source

This changes the string in Efl_Class_Description to use the real
class name (with namespaces) instead of the C class name. The
reason for this is that this string is generic, not C-related.
---
 src/bin/eolian/sources.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 54bcd1c..9114435 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -604,8 +604,8 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
 
_funcs_params_init = eina_hash_pointer_new(NULL);
 
-   char *cname = NULL, *cnamel = NULL;
-   eo_gen_class_names_get(cl, &cname, NULL, &cnamel);
+   char *cnamel = NULL;
+   eo_gen_class_names_get(cl, NULL, NULL, &cnamel);
 
/* event section, they come first */
{
@@ -662,7 +662,7 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
eina_strbuf_append(buf, cnamel);
eina_strbuf_append(buf, "_class_desc = {\n"
"   EO_VERSION,\n");
-   eina_strbuf_append_printf(buf, "   \"%s\",\n", cname);
+   eina_strbuf_append_printf(buf, "   \"%s\",\n", 
eolian_class_full_name_get(cl));
 
switch (eolian_class_type_get(cl))
  {
@@ -739,7 +739,6 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
eina_strbuf_free(lbuf);
 
/* and we're done */
-   free(cname);
free(cnamel);
eina_hash_free(_funcs_params_init);
 }

-- 




[EGIT] [core/efl] master 01/01: Eo: Fix efl_isa() sometimes returning wrong results with extensions

2016-12-07 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 5424cdbd810042ba59e71bec6b8d91cb6a2c3e9c
Author: Tom Hacohen 
Date:   Wed Dec 7 13:55:13 2016 +

Eo: Fix efl_isa() sometimes returning wrong results with extensions

This fixes an issue where efl_isa() wouldn't work for extensions or
ancestors of extensions of a class.

Example:
Class A implements interface F2
F2 inherits from interface F1
obj is of class A

Before this patch efl_isa(obj, F1) would return false, now it returns
true as expected.

This is just one example, there is a whole array of variations to this
issue that are now fixed.

Thanks to Gustavo for reminding me of this.

@fix
---
 src/lib/eo/eo.c | 45 +
 src/tests/eo/interface/interface_main.c |  3 +++
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index c4c6a5f..20cf56d 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -228,14 +228,14 @@ _eo_op_class_get(Efl_Object_Op op)
 }
 
 static inline Eina_Bool
-_vtable_func_set(Eo_Vtable *vtable, const _Efl_Class *klass, Efl_Object_Op op, 
Eo_Op_Func_Type func)
+_vtable_func_set(Eo_Vtable *vtable, const _Efl_Class *klass, Efl_Object_Op op, 
Eo_Op_Func_Type func, Eina_Bool allow_same_override)
 {
op_type_funcs *fsrc;
size_t idx1 = DICH_CHAIN1(op);
Dich_Chain1 *chain1 = &vtable->chain[idx1];
_vtable_chain_write_prepare(chain1);
fsrc = &chain1->chain2->funcs[DICH_CHAIN_LAST(op)];
-   if (fsrc->src == klass)
+   if (!allow_same_override && (fsrc->src == klass))
  {
 const _Efl_Class *op_kls = _eo_op_class_get(op);
 ERR("Class '%s': Overriding already set func %p for op %d (%s) with 
%p.",
@@ -746,7 +746,7 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops 
*ops, const _Efl_Cla
 
 DBG("%p->%p '%s'", op_desc->api_func, op_desc->func, 
_eo_op_desc_name_get(op_desc));
 
-if (!_vtable_func_set(vtable, klass, op, op_desc->func))
+if (!_vtable_func_set(vtable, klass, op, op_desc->func, EINA_FALSE))
   return EINA_FALSE;
 
 last_api_func = op_desc->api_func;
@@ -1224,6 +1224,25 @@ _eo_class_isa_func(Eo *eo_id EINA_UNUSED, void 
*class_data EINA_UNUSED)
/* Do nonthing. */
 }
 
+static void
+_eo_class_isa_recursive_set(_Efl_Class *klass, const _Efl_Class *cur)
+{
+   const _Efl_Class **extn_itr;
+
+   _vtable_func_set(&klass->vtable, klass, cur->base_id + cur->ops_count,
+ _eo_class_isa_func, EINA_TRUE);
+
+   for (extn_itr = cur->extensions ; *extn_itr ; extn_itr++)
+ {
+_eo_class_isa_recursive_set(klass, *extn_itr);
+ }
+
+   if (cur->parent)
+ {
+_eo_class_isa_recursive_set(klass, cur->parent);
+ }
+}
+
 static inline void
 _eo_classes_release(void)
 {
@@ -1509,25 +1528,7 @@ efl_class_new(const Efl_Class_Description *desc, const 
Efl_Class *parent_id, ...
/* Mark which classes we implement */
if (klass->vtable.size)
  {
-const _Efl_Class **extn_itr;
-
-for (extn_itr = klass->extensions ; *extn_itr ; extn_itr++)
-  {
- const _Efl_Class *extn = *extn_itr;
- /* Set it in the dich. */
- _vtable_func_set(&klass->vtable, klass, extn->base_id +
-   extn->ops_count, _eo_class_isa_func);
-  }
-
-_vtable_func_set(&klass->vtable, klass, klass->base_id + 
klass->ops_count,
-  _eo_class_isa_func);
-
-if (klass->parent)
-  {
- _vtable_func_set(&klass->vtable, klass,
-   klass->parent->base_id + klass->parent->ops_count,
-   _eo_class_isa_func);
-  }
+_eo_class_isa_recursive_set(klass, klass);
  }
 
_eo_class_constructor(klass);
diff --git a/src/tests/eo/interface/interface_main.c 
b/src/tests/eo/interface/interface_main.c
index e9e145b..8f07bb2 100644
--- a/src/tests/eo/interface/interface_main.c
+++ b/src/tests/eo/interface/interface_main.c
@@ -35,6 +35,9 @@ main(int argc, char *argv[])
sum = interface2_ab_sum_get2(obj);
fail_if(sum != a + b + 1);
 
+   fail_if(!efl_isa(obj, INTERFACE_CLASS));
+   fail_if(!efl_isa(obj, INTERFACE2_CLASS));
+
efl_unref(obj);
efl_object_shutdown();
return 0;

-- 




Re: [E-devel] eo_isa() buggy

2016-12-07 Thread Tom Hacohen
Hey,

I just pushed 5424cdbd810042ba59e71bec6b8d91cb6a2c3e9c that I hope 
should fix it. This commit fixes a bug I've known for a while and just 
forgot to fix. From your description, I believe it is the same issue, 
but please verify.

Thanks for reporting.

--
Tom.

On 07/12/16 02:14, Gustavo Sverzut Barbieri wrote:
> eo_isa(o, iface) is buggy as shown with:
>
>   EINA_LOG_LEVELS=eo:4 EFL_RUN_IN_TREE=1 libtool --mode=execute sh
> ./src/scripts/eo/eo_debug
> ./src/examples/ecore/efl_net_dialer_simple_example ssl localhost:1234
>
> It will report Efl_Net_Dialer_Ssl fails efl_isa() with both
> Efl_Io_Reader and Efl_Io_Writer, not in the message but also seems to
> fail Efl_Io_Closer (not a critical error for that usage).
>
> These are declared as:
>
> class Efl.Net.Dialer.Ssl (Efl.Net.Socket.Ssl, Efl.Net.Dialer);
> class Efl.Net.Socket.Ssl (Efl.Loop_User, Efl.Net.Socket);
> interface Efl.Net.Dialer (Efl.Net.Socket);
> interface Efl.Net.Socket (Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer);
>
> then both Efl.Net.Socket.Ssl AND Efl.Net.Dialer would lead to these 3
> interfaces.
>
> Log (removed function names to be shorter) also says they are added to
> the methods vtable:
>
> DBG<20851>:eo lib/eo/eo.c:1334 Started building extensions list for
> class 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1366 Finished building extensions list for
> class 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1371 Started building MRO list for class
> 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1382 Finished building MRO list for class
> 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1390 Started building Mixins list for class
> 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1404 Finished building Mixins list for class
> 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1444 Added 'Efl_Io_Writer' extension
> DBG<20851>:eo lib/eo/eo.c:1444 Added 'Efl_Io_Closer' extension
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Net_Socket' to MRO
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Io_Closer' to MRO
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Io_Reader' to MRO
> DBG<20851>:eo lib/eo/eo.c:699 Set functions for class
> 'Efl_Net_Socket':0x556186c12ff0
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53989c40->(nil)
> 'efl_net_socket_address_local_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53989e00->(nil)
> 'efl_net_socket_address_local_set'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53989fa0->(nil)
> 'efl_net_socket_address_remote_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5398a160->(nil)
> 'efl_net_socket_address_remote_set'
> DBG<20851>:eo lib/eo/eo.c:699 Set functions for class
> 'Efl_Net_Socket':0x556186c12ff0
> DBG<20851>:eo lib/eo/eo.c:1535 Finished building class 'Efl_Net_Socket'
> DBG<20851>:eo lib/eo/eo.c:1334 Started building extensions list for
> class 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1366 Finished building extensions list for
> class 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1371 Started building MRO list for class
> 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1382 Finished building MRO list for class
> 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1390 Started building Mixins list for class
> 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1404 Finished building Mixins list for class
> 'Efl_Net_Socket_Ssl'
> DBG<20851>:eo lib/eo/eo.c:1444 Added 'Efl_Net_Socket' extension
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Net_Socket_Ssl' to MRO
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Loop_User' to MRO
> DBG<20851>:eo lib/eo/eo.c:1457 Added 'Efl_Object' to MRO
> DBG<20851>:eo lib/eo/eo.c:699 Set functions for class
> 'Efl_Net_Socket_Ssl':0x556186c134c0
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53c0ed80->0x7fdc539b5220 'efl_constructor'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53c0ef40->0x7fdc539b5270 'efl_destructor'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc53c0f0e0->0x7fdc539b53f0 'efl_finalize'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133f7e0->0x7fdc539b5560
> 'efl_io_closer_close'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133edb0->0x7fdc539b5620
> 'efl_io_closer_closed_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133f2d0->0x7fdc539b5670
> 'efl_io_closer_close_on_exec_set'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133f120->0x7fdc539b56c0
> 'efl_io_closer_close_on_exec_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133f640->0x7fdc539b5710
> 'efl_io_closer_close_on_destructor_set'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc5133f490->0x7fdc539b5750
> 'efl_io_closer_close_on_destructor_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc51340aa0->0x7fdc539b57a0
> 'efl_io_reader_read'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc513405b0->0x7fdc539b5890
> 'efl_io_reader_can_read_set'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc51340400->0x7fdc539b5930
> 'efl_io_reader_can_read_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc51340900->0x7fdc539b5950
> 'efl_io_reader_eos_set'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc51340750->0x7fdc539b5a00
> 'efl_io_reader_eos_get'
> DBG<20851>:eo lib/eo/eo.c:747 0x7fdc513419b0->0x7fdc539b5a20
> 'efl_io_writer_write'
> DBG<20851>:eo lib/eo/eo.c:747 0

Re: [E-devel] What do you think of Vala?

2016-12-07 Thread Christian Stroetmann
Am 07.12.2016 07:11, schrieb Jean-Philippe André:
> Hey Conr2d,
>
> On 6 December 2016 at 13:33, Conrad Um  wrote:
>
>> Dear friends,
>>
>> I'm a big fan of vala (if you don't know what vala is, please see this link
>> ), and writing a vala binding
>> generator for EFL.
>>
>> Vala has a syntax similar to C# and has managed feature based on reference
>> counting, but basically it just converts .vala files to .c files to compile
>> them with gcc and gobject library.
>>
>> My experimental generator can create VAPI files for having vala recognize C
>> APIs, but only support compact class type which is not a full-featured vala
>> class type.
>> (Because complete vala class is based on gobject system. You can see the
>> difference of compact and complete class here
>> > eType.5D_and_.5BCompact.5D_in_bindings_mean.3F>
>> .)
>> If I want to use all features supported in vala, I should make a wrapper
>> class like in eolian_cxx.
>>
>> By the way, it comes to my mind that makes vala generate c code based on eo
>> instead of gobject. It can be used by application developers, but I think
>> even EFL developers can write libraries with modern language.
>>
>> Currently, we should write 2 files (.c and .eo) per class at least.
>> However, vala with eo backend only requires 1 vala file.
>>
>> For example,
>>
>> public class Elm.Button : Elm.Layout, Efl.Ui.Clickable,
>> Elm.Interface.Atspi_Widget_Action
>> {
>> /* elm_widget_button.h, contents of private header */
>> private double ar_initial_timeout;
>> private double ar_gap_timeout;
>> private Ecore.Timer? timer; // question mark means nullable
>> private bool repeating;
>>
>> /* events */
>> public signal void clicked();
>> public signal void repeated();
>>
>> /* elm_button.c, property setter/getter body */
>> public bool autorepeat {
>>set {
>>   timer = null; // To assign null to 'timer' will unref timer.
>>   autorepeat = value;
>>   repeating = false;
>>}
>>get {
>>   return autorepeat&  admits_autorepeat;
>> }
>> }
>>
>> /* elm_button.c, private function body */
>> private void activate() {
>>timer = null;
>>repeating = false;
>>/* if property getter is set, the next condition will be (!disabled
>> &&  !freeze_events) */
>>if (!disabled_get()&&  !freeze_events_get())
>>   clicked(); // invokes callbacks for "clicked" events
>> }
>>
>> /* elm_button.c, override Efl.Canvas.Group.group_add() */
>> public override group_add() {
>>base.group_add(); // efl_super
>>sub_object_parent_add();
>>
>>/* lambda expression */
>>resize_obj.signal_callback_add("elm,action,click", "*", (emission,
>> source) =>
>>{
>>   activate();
>>});
>>
>>access_object_register(resize_obj);
>>can_focus_set(true);
>>
>>theme_set("button", "base", style_get());
>> }
>> ...
>> }
>>
>> With vala file like above, valac (vala compiler) with eo backend will be
>> able to generate several files we need. (public header, private header, c
>> file including .c and .eo.c contents)
>> Moreover, header and c files generated by valac are simple c source files,
>> so they can be compiled with existing code or c file written in c from the
>> beginning (not generated).
>> I know all EFL developers are C expert, and you may never feel need of
>> redundant tools except for C. However I think if you want EFL to advance
>> further and continuously, we should investigate how we can adapt modern
>> concepts, knowledge and ideas on our works.
>>
>> It's just a suggestion, but if there is any one interested in this idea, we
>> can start new project for the future. :D
>>
> I was wondering when you would go public with your idea :)

See [1] and [2].

> Will you publish your current code somewhere? You have a private repo on
> git.e.org.
>
> I think this is really cool as it seems to generate a (almost?)
> zero-overhead binding in a friendly language.
> I know nothing about C# or Vala, although I know they only look similar,
> they are not the same language.
>
> I doubt we would use this inside the EFL codebase itself but I can
> definitely see the value in a new language binding.
>
> If only the EFL interfaces could be completed already...
>
> Best regards
>
Sadly to say, I cannot provide evidence why Microsoft has developed C# 
with its managed code in this way. But for everybody who is open minded 
I can give the hint that it has something in common with metadata and 
ontologies as well as my developements in 1997 to 2003. Form time to 
time I work a little on details of this (see again [2]).



Regards
C.S.

[1] Ontologics OntoLix officially started, 9th of November 2014 
(www.ontomax.com/newsarchive/2014/november.htm#09.November.2014)
[2] Ontonics, OntoLab, Ontologics, O

[EGIT] [core/efl] efl-1.18 01/01: release: Update NEWS and bump version for 1.18.4 release

2016-12-07 Thread Stefan Schmidt
stefan pushed a commit to branch efl-1.18.

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

commit f3038adf5b6ce0da3e5edbc25f4ca85abb396bff
Author: Stefan Schmidt 
Date:   Wed Dec 7 15:26:23 2016 +0100

release: Update NEWS and bump version for 1.18.4 release
---
 NEWS | 11 ++-
 configure.ac |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 371b4b4..a3ad83a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,16 @@
 ==
-EFL 1.18.3
+EFL 1.18.4
 ==
 
+Changes since 1.18.3:
+-
+
+Fixes:
+
+   * evas/x11: Fix EGL engine for recent nvidia binary
+   * gl drm/x11: Fix compilation for EGL < 1.5
+   * ecore_x: Early check image bpp based on depth (T4389)
+
 Changes since 1.18.2:
 -
 
diff --git a/configure.ac b/configure.ac
index fc70ad4..7e9bd3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-EFL_VERSION([1], [18], [3], [release])
+EFL_VERSION([1], [18], [4], [release])
 AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
 
 AC_PREREQ([2.60])

-- 




[E-devel] Pre-release tarballs for efl 1.18.4

2016-12-07 Thread Stefan Schmidt
Hello.

I just uploaded the pre-release tarballs for 1.18.4.

If I hear nothing problematic within the next 24 hours, I will do the
final release.

https://download.enlightenment.org/pre-releases/efl-1.18.4-pre.tar.gz
d19669eece770cc09733568c7dfef9870daa0f8b9f613ab76ad14b2f5de20040

https://download.enlightenment.org/pre-releases/efl-1.18.4-pre.tar.xz
39ebc07e37437d6ecdeb0f645783484e28a882b38f7e619ad12c2bf9b5548025

regards
Stefan Schmidt

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: evas - software generic - fix crash

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit eafb05c58a0c5c724da484c2d745e7d08aa3fdc4
Author: Derek Foreman 
Date:   Wed Dec 7 10:10:42 2016 -0600

evas - software generic - fix crash

Commit fcef8d8392b8c8d1d7b96baacaf5e7e89fcf6b45
breaks any evas engine that frees/NULLs its own outbuf before
calling evas_render_engine_software_generic_update()

We should unconditionally set the outbuf, we only need to
do the free conditionally.
---
 .../evas/engines/software_generic/Evas_Engine_Software_Generic.h   | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index 59537c9..05863cd 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -177,11 +177,8 @@ 
evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
Outbuf *ob,
int w, int h)
 {
-   if ((re->ob) && (re->ob != ob))
- {
-re->outbuf_free(re->ob);
-re->ob = ob;
- }
+   if ((re->ob) && (re->ob != ob)) re->outbuf_free(re->ob);
+   re->ob = ob;
 
evas_common_tilebuf_free(re->tb);
re->tb = evas_common_tilebuf_new(w, h);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 02/17: stack subsurfaces above their parents upon creation

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 0eb453f39cee77842f1ff61c2892cb0950ae3653
Author: Mike Blumenkrantz 
Date:   Tue Nov 29 10:08:49 2016 -0500

stack subsurfaces above their parents upon creation

handles the case where no explicit stacking is set on the subsurface
---
 src/bin/e_comp_wl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 08c0321..5fc3549 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2318,6 +2318,8 @@ _e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, 
uint32_t id, struct wl
 
ec->comp_data->surface = surface_resource;
ec->comp_data->sub.data = sdata;
+   evas_object_layer_set(ec->frame, evas_object_layer_get(epc->frame));
+   evas_object_stack_above(ec->frame, epc->frame);
 
return EINA_TRUE;
 

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 13/17: fix internal wl windows to exit when border X is clicked

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 35530a546e27404e97348fe9de23bdf55a4cb885
Author: Mike Blumenkrantz 
Date:   Mon Dec 5 10:49:06 2016 -0500

fix internal wl windows to exit when border X is clicked
---
 src/bin/e_comp_wl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 38971f6..bc18243 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -928,7 +928,8 @@ _e_comp_wl_evas_cb_delete_request(void *data, Evas_Object 
*obj EINA_UNUSED, void
  {
 if (ec->internal_elm_win)
   E_FREE_FUNC(ec->internal_elm_win, evas_object_del);
-e_object_del(E_OBJECT(ec));
+else
+  e_object_del(E_OBJECT(ec));
  }
 
_e_comp_wl_focus_check();
@@ -1827,6 +1828,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client 
*client, struct wl_reso
ec->netwm.pid = pid;
if (client != e_comp_wl->xwl_client)
  ec->internal = pid == getpid();
+   ec->icccm.delete_request |= ec->internal;
 
/* set reference to pixmap so we can fetch it later */
DBG("\tUsing Client: %p", ec);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 03/17: use more accurate determination for applying xdg-shell (un)maximize operations

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit a61f64f150030875ab81e340b9b4a2f949144469
Author: Mike Blumenkrantz 
Date:   Wed Nov 30 11:15:42 2016 -0500

use more accurate determination for applying xdg-shell (un)maximize 
operations

fixes maximizing again
---
 src/modules/wl_desktop_shell/e_mod_main.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index bb9cf5d..d9566d1 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -721,7 +721,7 @@ _xdg_shell_surface_send_configure(struct wl_resource 
*resource, Eina_Bool fullsc
  {
 if (maximized)
   pending |= STATE_MAXIMIZED;
-else if (ec->maximized)
+else if (ec->maximized || ec->comp_data->unmax)
   pending |= STATE_UNMAXIMIZED;
  }
shd->maximized = maximized;
@@ -987,13 +987,15 @@ _e_xdg_shell_surface_cb_ack_configure(struct wl_client 
*client EINA_UNUSED, stru
   {
  ec->comp_data->shell.set.maximize = 1;
  ec->comp_data->shell.set.unmaximize = 0;
- ec->comp_data->max = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
+ if (!ec->comp_data->max)
+   ec->comp_data->max = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
   }
 if (ps->state & STATE_UNMAXIMIZED)
   {
  ec->comp_data->shell.set.unmaximize = 1;
  ec->comp_data->shell.set.maximize = 0;
- ec->comp_data->unmax = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
+ if (!ec->comp_data->unmax)
+   ec->comp_data->unmax = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
   }
 shd->pending = eina_list_remove_list(shd->pending, l);
 free(ps);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 12/17: attempt to re-set wl surface pointer when popping back to "default" pointer type

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 6aba66cee883a872f8d284987971143fd088333c
Author: Mike Blumenkrantz 
Date:   Fri Dec 2 10:51:57 2016 -0500

attempt to re-set wl surface pointer when popping back to "default" pointer 
type

this automatically handles the case where enlightenment has commandeered the
cursor temporarily and the active client has not unset+set a new cursor in 
the
meantime
---
 src/bin/e_pointer.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c
index 134950e..c008769 100644
--- a/src/bin/e_pointer.c
+++ b/src/bin/e_pointer.c
@@ -459,7 +459,16 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
 _e_pointer_hot_update(ptr, x, y);
 
 if (ptr->canvas)
-  e_pointer_object_set(ptr, NULL, 0, 0);
+  {
+ E_Client *ec = e_client_top_get();
+
+ if (ec && (e_comp->comp_type == E_PIXMAP_TYPE_WL) &&
+ (!e_pixmap_is_x(ec->pixmap)) && ec->override &&
+ eina_streq(type, "default"))
+   e_pointer_object_set(ptr, ec->frame, 0, 0);
+ else
+   e_pointer_object_set(ptr, NULL, 0, 0);
+  }
 else
   evas_object_show(ptr->o_ptr);
 

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 01/17: handle xdg-shell maximize/unmaximize calls correctly

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 7b7ba99c4d99928ad5db28fa3a0f4117da421cf3
Author: Mike Blumenkrantz 
Date:   Tue Nov 29 10:05:21 2016 -0500

handle xdg-shell maximize/unmaximize calls correctly
---
 src/modules/wl_desktop_shell/e_mod_main.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index d80ab41..bb9cf5d 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -713,7 +713,7 @@ _xdg_shell_surface_send_configure(struct wl_resource 
*resource, Eina_Bool fullsc
  {
 if (fullscreen)
   pending |= STATE_FULLSCREEN;
-else
+else if (ec->fullscreen)
   pending |= STATE_UNFULLSCREEN;
  }
shd->fullscreen = fullscreen;
@@ -721,7 +721,7 @@ _xdg_shell_surface_send_configure(struct wl_resource 
*resource, Eina_Bool fullsc
  {
 if (maximized)
   pending |= STATE_MAXIMIZED;
-else
+else if (ec->maximized)
   pending |= STATE_UNMAXIMIZED;
  }
shd->maximized = maximized;
@@ -987,11 +987,13 @@ _e_xdg_shell_surface_cb_ack_configure(struct wl_client 
*client EINA_UNUSED, stru
   {
  ec->comp_data->shell.set.maximize = 1;
  ec->comp_data->shell.set.unmaximize = 0;
+ ec->comp_data->max = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
   }
 if (ps->state & STATE_UNMAXIMIZED)
   {
  ec->comp_data->shell.set.unmaximize = 1;
  ec->comp_data->shell.set.maximize = 0;
+ ec->comp_data->unmax = (e_config->maximize_policy & 
E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH;
   }
 shd->pending = eina_list_remove_list(shd->pending, l);
 free(ps);
@@ -1065,7 +1067,6 @@ _e_xdg_shell_surface_cb_maximized_unset(struct wl_client 
*client EINA_UNUSED, st
if (e_object_is_del(E_OBJECT(ec))) return;
 
if (ec->lock_user_maximize) return;
-   ec->comp_data->unmax = (e_config->maximize_policy & E_MAXIMIZE_TYPE) | 
E_MAXIMIZE_BOTH;
if (e_config->window_maximize_animate && (!ec->maximize_anims_disabled))
  w = ec->w, h = ec->h;
else
@@ -1127,7 +1128,6 @@ _e_xdg_shell_surface_cb_minimized_set(struct wl_client 
*client EINA_UNUSED, stru
 
if (ec->lock_user_iconify) return;
ec->comp_data->shell.set.minimize = 1;
-   ec->comp_data->max = (e_config->maximize_policy & E_MAXIMIZE_TYPE) | 
E_MAXIMIZE_BOTH;
 }
 
 static const struct xdg_surface_interface _e_xdg_surface_interface =

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 16/17: maintain "empty" object's size hints when ibar/ibox resizes

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 187076a0ddf412b7ad761ba8273c9585aa7e6226
Author: Mike Blumenkrantz 
Date:   Tue Dec 6 11:23:19 2016 -0500

maintain "empty" object's size hints when ibar/ibox resizes

the sizing issue in all of these tickets was caused by the "empty" object
being deleted, thus allowing the box to reset to 0x0 size hints and
returning this value as the overall size during recalc; the result is that
all icons would be sized at 0x0 instead of using the preserved orient size
as expected

fix T4509, T4647, T4830, T4733, T4524
---
 src/modules/ibar/e_mod_main.c | 44 ++-
 src/modules/ibox/e_mod_main.c | 40 ---
 2 files changed, 34 insertions(+), 50 deletions(-)

diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 8171090..6ecbe14 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -511,34 +511,19 @@ _ibar_cb_empty_mouse_down(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EINA
 static void
 _ibar_empty_handle(IBar *b)
 {
-   if (!b->icons)
+   if (!b->o_empty)
  {
-if (!b->o_empty)
-  {
- Evas_Coord w, h;
-
- b->o_empty = 
evas_object_rectangle_add(evas_object_evas_get(b->o_box));
- E_EXPAND(b->o_empty);
- E_FILL(b->o_empty);
- evas_object_event_callback_add(b->o_empty,
-EVAS_CALLBACK_MOUSE_DOWN,
-_ibar_cb_empty_mouse_down, b);
- evas_object_color_set(b->o_empty, 0, 0, 0, 0);
- evas_object_show(b->o_empty);
- elm_box_pack_end(b->o_box, b->o_empty);
- evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h);
- if (elm_box_horizontal_get(b->o_box))
-   w = h;
- else
-   h = w;
- evas_object_size_hint_min_set(b->o_empty, w, h);
-  }
- }
-   else if (b->o_empty)
- {
-evas_object_del(b->o_empty);
-b->o_empty = NULL;
+b->o_empty = evas_object_rectangle_add(evas_object_evas_get(b->o_box));
+E_EXPAND(b->o_empty);
+E_FILL(b->o_empty);
+evas_object_event_callback_add(b->o_empty,
+   EVAS_CALLBACK_MOUSE_DOWN,
+   _ibar_cb_empty_mouse_down, b);
+evas_object_color_set(b->o_empty, 0, 0, 0, 0);
  }
+   if (b->icons) return;
+   evas_object_show(b->o_empty);
+   elm_box_pack_end(b->o_box, b->o_empty);
 }
 
 static void
@@ -655,6 +640,13 @@ _ibar_resize_handle(IBar *b)
  w = h;
else
  h = w;
+   if (w || h)
+ evas_object_size_hint_min_set(b->o_empty, w, h);
+   if (b->icons && evas_object_visible_get(b->o_empty))
+ {
+elm_box_unpack(b->o_box, b->o_empty);
+evas_object_hide(b->o_empty);
+ }
EINA_INLIST_FOREACH(b->icons, ic)
  {
 evas_object_size_hint_min_set(ic->o_holder, w, h);
diff --git a/src/modules/ibox/e_mod_main.c b/src/modules/ibox/e_mod_main.c
index 254bd62..df755d7 100644
--- a/src/modules/ibox/e_mod_main.c
+++ b/src/modules/ibox/e_mod_main.c
@@ -372,32 +372,17 @@ _ibox_cb_empty_mouse_down(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EINA
 static void
 _ibox_empty_handle(IBox *b)
 {
-   if (!b->icons)
+   if (!b->o_empty)
  {
-if (!b->o_empty)
-  {
- Evas_Coord w, h;
-
- b->o_empty = 
evas_object_rectangle_add(evas_object_evas_get(b->o_box));
- evas_object_event_callback_add(b->o_empty, 
EVAS_CALLBACK_MOUSE_DOWN, _ibox_cb_empty_mouse_down, b);
- evas_object_color_set(b->o_empty, 0, 0, 0, 0);
- evas_object_show(b->o_empty);
- elm_box_pack_end(b->o_box, b->o_empty);
- evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h);
- if (elm_box_horizontal_get(b->o_box))
-   w = h;
- else
-   h = w;
- E_EXPAND(b->o_empty);
- E_FILL(b->o_empty);
- evas_object_size_hint_min_set(b->o_empty, w, h);
-  }
- }
-   else if (b->o_empty)
- {
-evas_object_del(b->o_empty);
-b->o_empty = NULL;
+b->o_empty = evas_object_rectangle_add(evas_object_evas_get(b->o_box));
+evas_object_event_callback_add(b->o_empty, EVAS_CALLBACK_MOUSE_DOWN, 
_ibox_cb_empty_mouse_down, b);
+evas_object_color_set(b->o_empty, 0, 0, 0, 0);
+E_EXPAND(b->o_empty);
+E_FILL(b->o_empty);
  }
+   if (b->icons) return;
+   evas_object_show(b->o_empty);
+   elm_box_pack_end(b->o_box, b->o_empty);
 }
 
 static void
@@ -480,6 +465,13 @@ _ibox_resize_handle(IBox *b)
  w = h;
else
  h = w;
+   if (w || h)
+ evas

[EGIT] [core/enlightenment] enlightenment-0.21 11/17: set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 28160ad4506f3d75d2052516270c24d06f488799
Author: Mike Blumenkrantz 
Date:   Fri Dec 2 10:51:01 2016 -0500

set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup

these later get overridden onto the pointer layer, but setting a layer
here ensures that the pointer surface will always be the client
returned by e_client_top_get()
---
 src/bin/e_comp_wl_input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index ff66feb..5839bd7 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -73,6 +73,7 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client 
*client, struct wl_resou
  {
 ec->comp_data->cursor = ec->re_manage = 1;
 ec->ignored = 0;
+evas_object_layer_set(ec->frame, E_LAYER_CLIENT_PRIO);
 
 ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1;
 ec->icccm.title = eina_stringshare_add("noshadow");

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 09/17: remove unused variables in e_comp_wl

2016-12-07 Thread Christopher Michael
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 1942f89bf4577a576a12308d56de57d418b600a5
Author: Chris Michael 
Date:   Fri Dec 2 10:41:16 2016 -0500

remove unused variables in e_comp_wl

Signed-off-by: Chris Michael 
---
 src/bin/e_comp_wl.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 7da5838..38971f6 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -589,19 +589,12 @@ _e_comp_wl_client_priority_normal(E_Client *ec)
 static Eina_Bool
 _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
 {
-   uint32_t serial, *k;
-   struct wl_resource *res;
-   Eina_List *l;
-   double t;
-
if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
 
ec->comp_data->on_focus_timer = NULL;
 
if (!e_comp_wl->kbd.focused) return EINA_FALSE;
e_comp_wl_input_keyboard_modifiers_update();
-   serial = wl_display_next_serial(e_comp_wl->wl.disp);
-   t = ecore_time_unix_get();
return EINA_FALSE;
 }
 
@@ -670,8 +663,7 @@ _e_comp_wl_keyboard_leave(E_Client *ec)
 {
struct wl_resource *res;
Eina_List *l, *ll;
-   uint32_t serial, *k;
-   double t;
+   uint32_t serial;
 
if (!eina_list_count(e_comp_wl->kbd.resources)) return;
if (!ec->comp_data) return;
@@ -690,7 +682,7 @@ _e_comp_wl_keyboard_leave(E_Client *ec)
  }
 
serial = wl_display_next_serial(e_comp_wl->wl.disp);
-   t = ecore_time_unix_get();
+
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
  {
 if (ec->comp_data->surface)

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 15/17: revert all sizing commits to ibar/ibox for the past year

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit b586409543c39567d45df648d52104be2548c146
Author: Mike Blumenkrantz 
Date:   Tue Dec 6 10:49:31 2016 -0500

revert all sizing commits to ibar/ibox for the past year

the assumption that this code was making assumptions about elm_box
internals based on a shallow reading of the code was incorrect, and
the resulting "fix" (and subsequent attempts to bandaid it) has left these
gadgets in an unusable state for the past half year.

disappoint.jpg

this reverts the following commits:

f97f8f61aca18e3be3f170e0a205ad728ba269e5
ebfa4a97cd6d9e801c9dd2dc0d169f4bd8a0bbc5
50030dc69346c209109c36bb41631b176c85b2c5
42aa6be35931e51b8dab5ed6629c3054595c82a8
504706d45ac2858be91721bd398d0c36a9bffd2d
b1f608c5e607c2101862eb4a63d53bef9cc58761
b107dc1cdc18b5edcdb44e74e0c69f0bb0e65cb7
3fc195cd9f926df1c92d906992d4e4c4ec5f3fe9
---
 src/modules/ibar/e_mod_main.c | 59 ++-
 src/modules/ibox/e_mod_main.c | 10 
 2 files changed, 30 insertions(+), 39 deletions(-)

diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index c4f01b5..8171090 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -285,7 +285,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
 drop, 3, x, y, w, h);
evas_object_event_callback_add(b->o_outerbox, EVAS_CALLBACK_MOVE,
   _ibar_cb_obj_moveresize, inst);
-   evas_object_event_callback_add(b->o_outerbox, 
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+   evas_object_event_callback_add(b->o_outerbox, EVAS_CALLBACK_RESIZE,
   _ibar_cb_obj_moveresize, inst);
ibar_config->instances = eina_list_append(ibar_config->instances, inst);
_ibar_resize_handle(b);
@@ -526,7 +526,7 @@ _ibar_empty_handle(IBar *b)
  evas_object_color_set(b->o_empty, 0, 0, 0, 0);
  evas_object_show(b->o_empty);
  elm_box_pack_end(b->o_box, b->o_empty);
- evas_object_size_hint_min_get(b->o_box, &w, &h);
+ evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h);
  if (elm_box_horizontal_get(b->o_box))
w = h;
  else
@@ -638,50 +638,41 @@ static void
 _ibar_resize_handle(IBar *b)
 {
IBar_Icon *ic;
-   Evas_Coord w, h, ww = 0, hh = 0;
+   Evas_Coord w, h;
 
if (!b->inst->gcc) return;
-
-   if (b->inst->gcc->gadcon->shelf)
- {
-/* we are in a shelf */
-ww = hh = b->inst->gcc->gadcon->shelf->cfg->size * 
elm_config_scale_get();
- }
-   else if (b->inst->gcc->max.w || b->inst->gcc->max.h)
- {
-evas_object_geometry_get(b->o_outerbox, NULL, NULL, &ww, &hh);
-ww = MIN(b->inst->gcc->max.w, ww);
-hh = MIN(b->inst->gcc->max.h, hh);
- }
-
-   /* Fallback to a size for the case noone gives a max size and no shelf 
config is there */
-   if (ww == 0) ww = 40;
-   if (hh == 0) hh = 40;
-
-
-   if (elm_box_horizontal_get(b->o_box)) ww = hh;
-   else hh = ww;
+   elm_box_recalculate(b->o_box);
+   elm_box_recalculate(b->o_outerbox);
+   if (!e_gadcon_site_is_desktop(b->inst->gcc->gadcon->location->site))
+ evas_object_size_hint_min_get(b->o_outerbox, &w, &h);
+   else
+ evas_object_geometry_get(b->o_outerbox, NULL, NULL, &w, &h);
+   if (b->inst->gcc->max.w)
+ w = MIN(w, b->inst->gcc->max.w);
+   if (b->inst->gcc->max.h)
+ h = MIN(h, b->inst->gcc->max.h);
+   if (elm_box_horizontal_get(b->o_box))
+ w = h;
+   else
+ h = w;
EINA_INLIST_FOREACH(b->icons, ic)
  {
-evas_object_size_hint_min_set(ic->o_holder, ww, hh);
-evas_object_size_hint_max_set(ic->o_holder, ww, hh);
+evas_object_size_hint_min_set(ic->o_holder, w, h);
+evas_object_size_hint_max_set(ic->o_holder, w, h);
  }
if (b->o_sep)
  {
-if (_is_vertical(b->inst)) hh = 16 * e_scale;
-else ww = 16 * e_scale;
+if (_is_vertical(b->inst))
+  h = 16 * e_scale;
+else
+  w = 16 * e_scale;
 evas_object_size_hint_min_set(b->o_sep, 8, 8);
-evas_object_size_hint_max_set(b->o_sep, ww, hh);
+evas_object_size_hint_max_set(b->o_sep, w, h);
  }
elm_box_recalculate(b->o_box);
elm_box_recalculate(b->o_outerbox);
-   evas_object_smart_calculate(b->o_outerbox);
-   evas_object_smart_calculate(b->o_box);
evas_object_size_hint_min_get(b->o_outerbox, &w, &h);
-   if (b->inst->gcc->max.w) w = MIN(w, b->inst->gcc->max.w);
-   if (b->inst->gcc->max.h) h = MIN(h, b->inst->gcc->max.h);
-   evas_object_resize(b->o_outerbox, w, h);
-
+   if ((!w) || (!h)) return;
e_gadcon_client_min_size_set(b->inst->gcc, w, h);
e_gadcon_client_aspect_set(b->inst->gcc, w, h);
 }
diff 

[EGIT] [core/enlightenment] enlightenment-0.21 04/17: Fix keyboard tracking when leaving an xdg shell window

2016-12-07 Thread Derek Foreman
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit e2eec45e3b14e21ebb21d89454a7d30a562c82be
Author: Derek Foreman 
Date:   Wed Nov 30 14:40:11 2016 -0600

Fix keyboard tracking when leaving an xdg shell window

_parent_client_contains_pointer() shouldn't return true if there is no
parent client.  This could result in leaving stale resources in the
keyboard focus list and crash the compositor.
---
 src/bin/e_comp_wl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 5fc3549..9ece9e3 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -52,6 +52,8 @@ _parent_client_contains_pointer(E_Client *ec)
 
while (top->parent) top = top->parent;
 
+   if (top == ec) return EINA_FALSE;
+
if (top->mouse.in) return EINA_TRUE;
 
EINA_LIST_FOREACH(top->comp_data->sub.list, l, c)

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 14/17: use better check for getting wl surface alpha from cursor pixmaps

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 923f2e900f4205235e1b583d65ccaabee4b057e1
Author: Mike Blumenkrantz 
Date:   Mon Dec 5 11:04:21 2016 -0500

use better check for getting wl surface alpha from cursor pixmaps

ref 6ba85cf864f19b083f652c7c7222d2c93b3b034e
---
 src/bin/e_pixmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 0c3b7d3..8565211 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -901,8 +901,8 @@ e_pixmap_image_is_argb(const E_Pixmap *cp)
 #ifdef HAVE_WAYLAND
 if (cp->usable)
   return cp->image_argb;
-if (((E_Comp_Wl_Client_Data*)cp->client->comp_data)->cursor)
-  return EINA_TRUE;
+/* only cursors can be override in wayland */
+if (cp->client->override) return EINA_TRUE;
 #endif
 default: break;
  }

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 08/17: Stop sending key up/down events on focus change under wayland

2016-12-07 Thread Derek Foreman
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit e1120051d0c04ac85e4b7f4d8474e658578f2981
Author: Derek Foreman 
Date:   Thu Dec 1 10:55:49 2016 -0600

Stop sending key up/down events on focus change under wayland

We shouldn't be doing this, but there's a collective memory that
this was put in place to fix stuck modifier bugs.

If we run into stuck modifiers again because of this patch, then we
should be fixing them in a different way.

If anyone bisects to this point, I apologize - assign me a ticket.
---
 src/bin/e_comp_wl.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 87c0c92..7da5838 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -602,10 +602,6 @@ _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
e_comp_wl_input_keyboard_modifiers_update();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
t = ecore_time_unix_get();
-   EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)
- wl_array_for_each(k, &e_comp_wl->kbd.keys)
-   wl_keyboard_send_key(res, serial, t,
-*k, WL_KEYBOARD_KEY_STATE_PRESSED);
return EINA_FALSE;
 }
 
@@ -697,9 +693,6 @@ _e_comp_wl_keyboard_leave(E_Client *ec)
t = ecore_time_unix_get();
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
  {
-wl_array_for_each(k, &e_comp_wl->kbd.keys)
-  wl_keyboard_send_key(res, serial, t,
-   *k, WL_KEYBOARD_KEY_STATE_RELEASED);
 if (ec->comp_data->surface)
   wl_keyboard_send_leave(res, serial, ec->comp_data->surface);
 e_comp_wl->kbd.focused = eina_list_remove_list(e_comp_wl->kbd.focused, 
l);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 07/17: e_util_defer_object_del - ensure order of deferred deletions are right

2016-12-07 Thread Carsten Haitzler
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 6cd108513b2424b85ac138b768384f3647bfd690
Author: Carsten Haitzler (Rasterman) 
Date:   Thu Nov 24 11:15:00 2016 +0900

e_util_defer_object_del - ensure order of deferred deletions are right

so since e_util_defer_object_del used a before idler this would
reverse deletion order vs the order submitted. this may cause issues.
not sure. chasing netstar's "animator stops" issue, but if defered
deletion if disabled seems to stop it from happening.

at least fix order if multiple deferred deletions are queued

@fix
---
 src/bin/e_utils.c | 64 ++-
 1 file changed, 45 insertions(+), 19 deletions(-)

diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c
index 5b4dc56..5db1631 100644
--- a/src/bin/e_utils.c
+++ b/src/bin/e_utils.c
@@ -710,6 +710,36 @@ e_util_dir_check(const char *dir)
return 1;
 }
 
+static Eina_Array *_delay_del_array = NULL;
+static Ecore_Idle_Enterer *_delay_del_idler = NULL;
+
+static Eina_Bool
+_e_util_cb_delayed_del(void *data EINA_UNUSED)
+{
+   while (_delay_del_array)
+ {
+Eina_Array *arr = _delay_del_array;
+Eina_Iterator *itr = eina_array_iterator_new(arr);
+void *ptr;
+
+_delay_del_array = NULL;
+while (eina_iterator_next(itr, &ptr))
+  {
+ if (ptr) e_object_del(E_OBJECT(ptr));
+  }
+eina_array_free(arr);
+ }
+   _delay_del_idler = NULL;
+   return ECORE_CALLBACK_CANCEL;
+}
+
+static void
+_e_util_cb_delayed_cancel(void *data, void *obj EINA_UNUSED)
+{
+   unsigned long c = (unsigned long)data;
+   if (_delay_del_array) eina_array_data_set(_delay_del_array, c, NULL);
+}
+
 E_API void
 e_util_defer_object_del(E_Object *obj)
 {
@@ -717,10 +747,21 @@ e_util_defer_object_del(E_Object *obj)
  e_object_del(obj);
else
  {
-Ecore_Idle_Enterer *idler;
-
-idler = ecore_idle_enterer_before_add(_e_util_cb_delayed_del, obj);
-if (idler) e_object_delfn_add(obj, _e_util_cb_delayed_cancel, idler);
+if (!_delay_del_array)
+  {
+ _delay_del_array = eina_array_new(8);
+ if (!_delay_del_idler)
+   _delay_del_idler = ecore_idle_enterer_before_add
+ (_e_util_cb_delayed_del, NULL);
+  }
+if (_delay_del_array)
+  {
+ if (eina_array_push(_delay_del_array, obj))
+   {
+  unsigned long c = eina_array_count_get(_delay_del_array);
+  e_object_delfn_add(obj, _e_util_cb_delayed_cancel, (void 
*)c);
+   }
+  }
  }
 }
 
@@ -818,21 +859,6 @@ _e_util_icon_add(const char *path, Evas *evas, int size)
 }
 
 static Eina_Bool
-_e_util_cb_delayed_del(void *data)
-{
-   e_object_del(E_OBJECT(data));
-   return ECORE_CALLBACK_CANCEL;
-}
-
-static void
-_e_util_cb_delayed_cancel(void *data, void *obj EINA_UNUSED)
-{
-   Ecore_Idle_Enterer *idler = data;
-
-   ecore_idle_enterer_del(idler);
-}
-
-static Eina_Bool
 _e_util_wakeup_cb(void *data EINA_UNUSED)
 {
_e_util_dummy_timer = NULL;

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 05/17: Fix crash when exiting an xdg shell application

2016-12-07 Thread Derek Foreman
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit ea3afd11c1bcb578954d9f3681dd9b0a31a7d9e3
Author: Derek Foreman 
Date:   Wed Nov 30 14:42:01 2016 -0600

Fix crash when exiting an xdg shell application

The focus in timer has been firing for deleted clients, this causes a
NULL pointer dereference.

Then again, maybe the timer should've been disabled by now...
---
 src/bin/e_comp_wl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 9ece9e3..df1a327 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -594,6 +594,8 @@ _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
Eina_List *l;
double t;
 
+   if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
+
ec->comp_data->on_focus_timer = NULL;
 
if (!e_comp_wl->kbd.focused) return EINA_FALSE;

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 10/17: do not pop pointer types on client hide events if the client is pass_events

2016-12-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 8d7cb8201e4ec120e43c7b201acca8d9b8f6782a
Author: Mike Blumenkrantz 
Date:   Fri Dec 2 10:50:21 2016 -0500

do not pop pointer types on client hide events if the client is pass_events

these clients cannot receive events and thus have no pointer to pop
---
 src/bin/e_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 361a5af..5e027c5 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -1395,7 +1395,8 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UN
if (e_object_is_del(data)) return; //client is about to die
_e_client_mouse_action_end(ec);
if (action_client == ec) _e_client_action_finish();
-   e_pointer_type_pop(e_comp->pointer, ec, NULL);
+   if (!evas_object_pass_events_get(ec->frame))
+ e_pointer_type_pop(e_comp->pointer, ec, NULL);
 
if (!ec->hidden)
  {

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 17/17: test dmabuf pixmaps properly

2016-12-07 Thread Derek Foreman
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit a73d38dfc096fb84703bf26bbaa6f8a2a2127f2a
Author: Derek Foreman 
Date:   Tue Dec 6 16:37:35 2016 -0600

test dmabuf pixmaps properly

If we can't handle a dmabuf format we now properly tell the client instead
of accepting it anyway and falling apart later.
---
 src/bin/e_pixmap.c | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 8565211..db17307 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -1054,10 +1054,23 @@ e_pixmap_alias(E_Pixmap *cp, E_Pixmap_Type type, ...)
 E_API Eina_Bool
 e_pixmap_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
 {
+   Evas_Native_Surface ns;
+   Evas_Object *test;
int size;
void *data;
 
-   if (e_comp->gl) return EINA_TRUE;
+   if (e_comp->gl)
+ {
+ns.type = EVAS_NATIVE_SURFACE_WL_DMABUF;
+ns.version = EVAS_NATIVE_SURFACE_VERSION;
+ns.data.wl_dmabuf.attr = &dmabuf->attributes;
+ns.data.wl_dmabuf.resource = NULL;
+test = evas_object_image_add(e_comp->evas);
+evas_object_image_native_surface_set(test, &ns);
+evas_object_del(test);
+if (!ns.data.wl_dmabuf.attr) return EINA_FALSE;
+return EINA_TRUE;
+ }
 
/* TODO: Software rendering for multi-plane formats */
if (dmabuf->attributes.n_planes != 1) return EINA_FALSE;

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 06/17: More aggressively prune keyboard focus list

2016-12-07 Thread Derek Foreman
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 51b25ecad4177d1d53429968880359666bc2668a
Author: Derek Foreman 
Date:   Wed Nov 30 14:46:36 2016 -0600

More aggressively prune keyboard focus list

Even if a client is deleted we still need to get its resources off the
keyboard focus list.
---
 src/bin/e_comp_wl.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index df1a327..87c0c92 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -673,14 +673,12 @@ static void
 _e_comp_wl_keyboard_leave(E_Client *ec)
 {
struct wl_resource *res;
-   struct wl_client *wc;
Eina_List *l, *ll;
uint32_t serial, *k;
double t;
 
if (!eina_list_count(e_comp_wl->kbd.resources)) return;
if (!ec->comp_data) return;
-   if (!ec->comp_data->surface) return;
 
if (ec->comp_data->is_xdg_surface)
  {
@@ -695,16 +693,15 @@ _e_comp_wl_keyboard_leave(E_Client *ec)
 while (ec->parent) ec = ec->parent;
  }
 
-   wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
t = ecore_time_unix_get();
EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
  {
-if (wl_resource_get_client(res) != wc) continue;
 wl_array_for_each(k, &e_comp_wl->kbd.keys)
   wl_keyboard_send_key(res, serial, t,
*k, WL_KEYBOARD_KEY_STATE_RELEASED);
-wl_keyboard_send_leave(res, serial, ec->comp_data->surface);
+if (ec->comp_data->surface)
+  wl_keyboard_send_leave(res, serial, ec->comp_data->surface);
 e_comp_wl->kbd.focused = eina_list_remove_list(e_comp_wl->kbd.focused, 
l);
  }
 }

-- 




[EGIT] [core/efl] master 02/02: build: coverage: work around lcov 1.12 bug by using absolute paths for info files

2016-12-07 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 9c38423ecd6e6732f6c5118b036b1fd3d4ed8ddc
Author: Stefan Schmidt 
Date:   Wed Dec 7 17:49:10 2016 +0100

build: coverage: work around lcov 1.12 bug by using absolute paths for info 
files

In case a warning gets printed from lcov some internal function changes the 
dir
to / and thus fails to create files in the given file later on. Using an
absolute path here is a workaround to avoid this problem. The fix is in lcoc
already but not yet in any release so we better keep this around here.
Lcov fix reference:

https://github.com/linux-test-project/lcov/commit/632c25a0d1f5e4d2f4fd5b28ce7c8b86d388c91f
---
 Makefile.am | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4190502..1620877 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -445,24 +445,24 @@ doc:
 if EFL_ENABLE_COVERAGE
 
 lcov-reset:
-   @rm -rf $(top_builddir)/coverage
-   @find $(top_builddir) -name "*.gcda" -delete
-   @lcov --zerocounters --directory $(top_builddir)
+   @rm -rf $(abs_top_builddir)/coverage
+   @find $(abs_top_builddir) -name "*.gcda" -delete
+   @lcov --zerocounters --directory $(abs_top_builddir)
 
 lcov-baseline:
-   $(MKDIR_P) $(top_builddir)/coverage
-   lcov --capture --initial --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-baseline.info --directory $(top_builddir) 
--config-file .lcov-config
+   $(MKDIR_P) $(abs_top_builddir)/coverage
+   lcov --capture --initial --compat-libtool --no-external --output-file 
$(abs_top_builddir)/coverage/coverage-baseline.info --directory 
$(abs_top_builddir) --config-file .lcov-config
 
 lcov-report:
-   lcov --capture --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-check.info --directory $(top_builddir) 
--config-file .lcov-config
-   lcov --no-external --compat-libtool --add-tracefile 
$(top_builddir)/coverage/coverage-baseline.info --add-tracefile 
$(top_builddir)/coverage/coverage-check.info --output-file 
$(top_builddir)/coverage/coverage.info --config-file .lcov-config
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.info '*.h' --output-file 
$(top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file 
$(top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned3.info '*/doc/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned4.info --config-file .lcov-config
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned4.info '*usr/include*' --output-file 
$(top_builddir)/coverage/coverage.cleaned5.info --config-file .lcov-config
-   genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o 
$(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned5.info
-   @echo "Coverage Report at $(top_builddir)/coverage/html"
+   lcov --capture --compat-libtool --no-external --output-file 
$(abs_top_builddir)/coverage/coverage-check.info --directory 
$(abs_top_builddir) --config-file .lcov-config
+   lcov --no-external --compat-libtool --add-tracefile 
$(abs_top_builddir)/coverage/coverage-baseline.info --add-tracefile 
$(abs_top_builddir)/coverage/coverage-check.info --output-file 
$(abs_top_builddir)/coverage/coverage.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(abs_top_builddir)/coverage/coverage.info '*.h' --output-file 
$(abs_top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(abs_top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file 
$(abs_top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(abs_top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file 
$(abs_top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(abs_top_builddir)/coverage/coverage.cleaned3.info '*/doc/*' --output-file 
$(abs_top_builddir)/coverage/coverage.cleaned4.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(abs_top_builddir)/coverage/coverage.cleaned4.info '*usr/include*' 
--output-file $(abs_top_builddir)/coverage/coverage.cleaned5.info --config-file 
.lcov-config
+ 

[EGIT] [core/efl] master 01/02: build: coverage: disable branch coverage generation to avoid hangs in gcov

2016-12-07 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 14c19e1c6f649cdd8694d8dd72129fc1a3caeddb
Author: Stefan Schmidt 
Date:   Wed Dec 7 17:35:57 2016 +0100

build: coverage: disable branch coverage generation to avoid hangs in gcov

I have seen hangs with gcov on Jenkins and locally where the processing just
keeps spinning in an infinite loop. From what I have found out this boils 
down
to using gcov --all-blocks which is what lcov does with branch coverage 
enabled.
It is supposed to be fixed in gcc 4.8+ but I see this here with 5.3.1. So 
its
either a regression or not completely fixed. In any case we will ignore 
branch
coverage for now. I hoped it would work well but it did only for a while and
having line and function coverage is better than having nothing.
---
 .lcov-config |  2 --
 Makefile.am  | 16 
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/.lcov-config b/.lcov-config
index ef201f5..b069cdd 100644
--- a/.lcov-config
+++ b/.lcov-config
@@ -1,3 +1 @@
 geninfo_auto_base=1
-lcov_branch_coverage=1
-genhtml_branch_coverage=1
diff --git a/Makefile.am b/Makefile.am
index cf10724..4190502 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -451,16 +451,16 @@ lcov-reset:
 
 lcov-baseline:
$(MKDIR_P) $(top_builddir)/coverage
-   lcov --capture --initial --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-baseline.info --directory $(top_builddir) 
--config-file .lcov-config --rc lcov_branch_coverage=1
+   lcov --capture --initial --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-baseline.info --directory $(top_builddir) 
--config-file .lcov-config
 
 lcov-report:
-   lcov --capture --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-check.info --directory $(top_builddir) 
--config-file .lcov-config --rc lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --add-tracefile 
$(top_builddir)/coverage/coverage-baseline.info --add-tracefile 
$(top_builddir)/coverage/coverage-check.info --output-file 
$(top_builddir)/coverage/coverage.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.info '*.h' --output-file 
$(top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file 
$(top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned3.info '*/doc/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned4.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
-   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned4.info '*usr/include*' --output-file 
$(top_builddir)/coverage/coverage.cleaned5.info --config-file .lcov-config --rc 
lcov_branch_coverage=1
+   lcov --capture --compat-libtool --no-external --output-file 
$(top_builddir)/coverage/coverage-check.info --directory $(top_builddir) 
--config-file .lcov-config
+   lcov --no-external --compat-libtool --add-tracefile 
$(top_builddir)/coverage/coverage-baseline.info --add-tracefile 
$(top_builddir)/coverage/coverage-check.info --output-file 
$(top_builddir)/coverage/coverage.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.info '*.h' --output-file 
$(top_builddir)/coverage/coverage.cleaned.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned2.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file 
$(top_builddir)/coverage/coverage.cleaned3.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned3.info '*/doc/*' --output-file 
$(top_builddir)/coverage/coverage.cleaned4.info --config-file .lcov-config
+   lcov --no-external --compat-libtool --remove 
$(top_builddir)/coverage/coverage.cleaned4.info '*usr/include*' --output-file 
$(top_builddir)/coverage/coverage.cleaned5.info --config-file .lcov-config
genhtml --config-file .lcov-config --legend -t "$(PACKAGE_STRING)" -o 
$(top_builddir)/coverage/html $(top_builddir)/cove

[EGIT] [core/efl] master 01/02: ecore_drm2: Make ecore_drm2_fb_release return status

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit 515362efe21e87ba9d8de087634085408b365d26
Author: Derek Foreman 
Date:   Wed Dec 7 11:28:33 2016 -0600

ecore_drm2: Make ecore_drm2_fb_release return status

We need to use this to free up gbm buffers on a surface release, so it
has to report when it successfully frees a buffer.
---
 src/lib/ecore_drm2/Ecore_Drm2.h|  5 -
 src/lib/ecore_drm2/ecore_drm2_fb.c | 20 +---
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 863a9c6..2b87981 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -866,10 +866,13 @@ EAPI void ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, 
Eina_Bool busy);
  *
  * @param output The output to force release
  * @param panic Try to release even buffers committed to scanout
+ *
+ * @return EINA_TRUE if a buffer was released
+ *
  * @ingroup Ecore_Drm2_Fb_Group
  * @since 1.19
  */
-EAPI void ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic);
+EAPI Eina_Bool ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic);
 
 /**
  * Set the user data for the output's page flip handler
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c 
b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 3737bdf..6648d67 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -455,20 +455,24 @@ ecore_drm2_fb_busy_set(Ecore_Drm2_Fb *fb, Eina_Bool busy)
fb->busy = busy;
 }
 
-EAPI void
+EAPI Eina_Bool
 ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic)
 {
-   EINA_SAFETY_ON_NULL_RETURN(o);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
 
if (o->next)
  {
 _release_buffer(o, o->next);
 o->next = NULL;
-return;
+return EINA_TRUE;
  }
-   if (!panic) return;
+   if (!panic) return EINA_FALSE;
 
-   WRN("Buffer release request when no next buffer");
+   /* This has been demoted to DBG from WRN because we
+* call this function to reclaim all buffers on a
+* surface resize.
+*/
+   DBG("Buffer release request when no next buffer");
/* If we have to release these we're going to see tearing.
 * Try to reclaim in decreasing order of visual awfulness
 */
@@ -476,15 +480,17 @@ ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool 
panic)
  {
 _release_buffer(o, o->current);
 o->current = NULL;
-return;
+return EINA_TRUE;
  }
 
if (o->pending)
  {
 _release_buffer(o, o->pending);
 o->pending = NULL;
-return;
+return EINA_TRUE;
  }
+
+   return EINA_FALSE;
 }
 
 EAPI void *

-- 




[EGIT] [core/efl] master 02/02: gl_drm: Don't destroy the outbuf in reconfigure

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit b997b108b5373556871ff9d1ed9bcfd2f0f49389
Author: Derek Foreman 
Date:   Wed Dec 7 11:29:39 2016 -0600

gl_drm: Don't destroy the outbuf in reconfigure

Cedric tells me this is bad, and I never argue with Cedric.

We now re-use the same outbuf and just reconfigure the gbm/gl stuff.
---
 src/modules/evas/engines/gl_drm/evas_outbuf.c | 29 +--
 1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c 
b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index 1f8ae74..a26b418 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -541,9 +541,7 @@ void
 evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth)
 {
Evas_Public_Data *epd;
-   Evas_Engine_Info_GL_Drm *einfo;
Render_Engine *re;
-   Outbuf *nob;
 
if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth;
 
@@ -553,31 +551,22 @@ evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int 
rot, Outbuf_Depth depth)
re = epd->engine.data.output;
EINA_SAFETY_ON_NULL_RETURN(re);
 
-   einfo = ob->info;
-
-   if ((ob->rotation == 0) || (ob->rotation == 180))
- nob = evas_outbuf_new(einfo, w, h, ob->swap_mode);
-   else
- nob = evas_outbuf_new(einfo, h, w, ob->swap_mode);
-
-   if (!nob)
- {
-ERR("Could not create new Outbuf");
-return;
- }
-
re->generic.software.ob->gl_context->references++;
 
-   evas_outbuf_free(ob);
-   re->generic.software.ob = NULL;
+   while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
 
-   evas_outbuf_use(nob);
+   _evas_outbuf_gbm_surface_destroy(ob);
+   if ((ob->rotation == 0) || (ob->rotation == 180))
+ _evas_outbuf_gbm_surface_create(ob, w, h);
+   else if ((ob->rotation == 90) || (ob->rotation == 270))
+ _evas_outbuf_gbm_surface_create(ob, h, w);
+   _evas_outbuf_egl_setup(ob);
 
-   evas_render_engine_software_generic_update(&re->generic.software, nob, w, 
h);
+   evas_render_engine_software_generic_update(&re->generic.software, ob, w, h);
 
re->generic.software.ob->gl_context->references--;
 
-   glsym_evas_gl_common_context_resize(nob->gl_context, w, h, rot);
+   glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
 }
 
 Render_Engine_Swap_Mode

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/08: evas: switch to use Ecore_Thread instead of half done Evas thread infrastructure.

2016-12-07 Thread Cedric BAIL
On Tue, Dec 6, 2016 at 10:50 PM, Daniel Zaoui  wrote:
> Hey borker,
>
> You should run Genlist 3. It is stuck on a lock when loading an image. git 
> bisect shows this patch as causing the issue.

Thanks for the heads up, will check it.

> Enjoy
> Daniel
>
> On Tue, 06 Dec 2016 16:34:54 -0800
> Cedric BAIL  wrote:
>
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=34758ad4f5eb1f036990faa7bfe8b258d1d4f497
>>
>> commit 34758ad4f5eb1f036990faa7bfe8b258d1d4f497
>> Author: Cedric BAIL 
>> Date:   Mon Dec 5 16:57:46 2016 -0800
>>
>> evas: switch to use Ecore_Thread instead of half done Evas thread
>> infrastructure. ---
>>  src/lib/evas/cache/evas_preload.c | 199
>> ++ 1 file changed, 51
>> insertions(+), 148 deletions(-)
>>
>> diff --git a/src/lib/evas/cache/evas_preload.c
>> b/src/lib/evas/cache/evas_preload.c index ecd3464..cd299e6 100644
>> --- a/src/lib/evas/cache/evas_preload.c
>> +++ b/src/lib/evas/cache/evas_preload.c
>> @@ -11,135 +11,87 @@
>>  #include "evas_private.h"
>>  #include "Evas.h"
>>
>> -static int _threads_max = 0;
>> -
>> -typedef struct _Evas_Preload_Pthread_Worker
>> Evas_Preload_Pthread_Worker; -typedef struct
>> _Evas_Preload_Pthread_Data Evas_Preload_Pthread_Data; +#include
>> "Ecore.h"
>> +typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
>>  typedef void (*_evas_preload_pthread_func)(void *data);
>>
>> -struct _Evas_Preload_Pthread_Worker
>> +struct _Evas_Preload_Pthread
>>  {
>> EINA_INLIST;
>>
>> +   Ecore_Thread *thread;
>> +
>> _evas_preload_pthread_func func_heavy;
>> _evas_preload_pthread_func func_end;
>> _evas_preload_pthread_func func_cancel;
>> void *data;
>> -   Eina_Bool cancel : 1;
>> -};
>> -
>> -struct _Evas_Preload_Pthread_Data
>> -{
>> -   Eina_Thread thread;
>>  };
>>
>> -static int _threads_count = 0;
>> -static Evas_Preload_Pthread_Worker *_workers = NULL;
>> -
>> -static LK(_mutex);
>> +static Eina_Inlist *works = NULL;
>>
>>  static void
>> -_evas_preload_thread_end(void *data)
>> +_evas_preload_thread_work_free(Evas_Preload_Pthread *work)
>>  {
>> -   Evas_Preload_Pthread_Data *pth = data;
>> -   Evas_Preload_Pthread_Data *p = NULL;
>> +   works = eina_inlist_remove(works, EINA_INLIST_GET(work));
>>
>> -   if ((p = eina_thread_join(pth->thread))) free(p);
>> -   else return;
>> -   eina_threads_shutdown();
>> +   free(work);
>>  }
>>
>>  static void
>> -_evas_preload_thread_done(void *target EINA_UNUSED,
>> Evas_Callback_Type type EINA_UNUSED, void *event_info)
>> +_evas_preload_thread_success(void *data, Ecore_Thread *thread
>> EINA_UNUSED) {
>> -   Evas_Preload_Pthread_Worker *work = event_info;
>> -   if (work->cancel)
>> - {
>> -if (work->func_cancel) work->func_cancel(work->data);
>> - }
>> -   else
>> -  work->func_end(work->data);
>> +   Evas_Preload_Pthread *work = data;
>>
>> -   free(work);
>> +   work->func_end(work->data);
>> +
>> +_evas_preload_thread_work_free(work);
>>  }
>>
>> -static void *
>> -_evas_preload_thread_worker(void *data, Eina_Thread thread
>> EINA_UNUSED) +static void
>> +_evas_preload_thread_fail(void *data, Ecore_Thread *thread
>> EINA_UNUSED) {
>> -   Evas_Preload_Pthread_Data *pth = data;
>> -   Evas_Preload_Pthread_Worker *work;
>> -
>> -   eina_thread_name_set(eina_thread_self(), "Eevas-preload");
>> -on_error:
>> -   for (;;)
>> - {
>> -LKL(_mutex);
>> -if (!_workers)
>> -  {
>> - LKU(_mutex);
>> - break;
>> -  }
>> +   Evas_Preload_Pthread *work = data;
>>
>> -work = _workers;
>> -_workers =
>> EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers),
>> EINA_INLIST_GET(_workers)), Evas_Preload_Pthread_Worker);
>> -LKU(_mutex);
>> +   if (work->func_cancel) work->func_cancel(work->data);
>>
>> -if (work->func_heavy) work->func_heavy(work->data);
>> -evas_async_events_put(pth, 0, work,
>> _evas_preload_thread_done);
>> - }
>> -
>> -   LKL(_mutex);
>> -   if (_workers)
>> - {
>> -LKU(_mutex);
>> -goto on_error;
>> - }
>> -   _threads_count--;
>> -   LKU(_mutex);
>> +   _evas_preload_thread_work_free(work);
>> +}
>>
>> -   // dummy worker to wake things up
>> -   work = malloc(sizeof(Evas_Preload_Pthread_Worker));
>> -   if (!work) return NULL;
>> +static void
>> +_evas_preload_thread_worker(void *data, Ecore_Thread *thread)
>> +{
>> +   Evas_Preload_Pthread *work = data;
>>
>> -   work->data = pth;
>> -   work->func_heavy = NULL;
>> -   work->func_end = (_evas_preload_pthread_func)
>> _evas_preload_thread_end;
>> -   work->func_cancel = NULL;
>> -   work->cancel = EINA_FALSE;
>> +   work->thread = thread;
>>
>> -   evas_async_events_put(pth, 0, work, _evas_preload_thread_done);
>> -   return pth;
>> +   work->func_heavy(work->data);
>>  }
>>
>>  void
>>  _evas_preload_thread_init(void)
>>  {
>> -   _threads_max = eina_cpu_count();
>> -   if (

Re: [E-devel] What do you think of Vala?

2016-12-07 Thread Cedric BAIL
On Tue, Dec 6, 2016 at 10:11 PM, Jean-Philippe André  wrote:
> On 6 December 2016 at 13:33, Conrad Um  wrote:
>> I'm a big fan of vala (if you don't know what vala is, please see this link
>> ), and writing a vala binding
>> generator for EFL.
>>
>> Vala has a syntax similar to C# and has managed feature based on reference
>> counting, but basically it just converts .vala files to .c files to compile
>> them with gcc and gobject library.
>>
>> My experimental generator can create VAPI files for having vala recognize C
>> APIs, but only support compact class type which is not a full-featured vala
>> class type.
>> (Because complete vala class is based on gobject system. You can see the
>> difference of compact and complete class here
>> > eType.5D_and_.5BCompact.5D_in_bindings_mean.3F>
>> .)
>> If I want to use all features supported in vala, I should make a wrapper
>> class like in eolian_cxx.
>>
>> By the way, it comes to my mind that makes vala generate c code based on eo
>> instead of gobject. It can be used by application developers, but I think
>> even EFL developers can write libraries with modern language.
>>
>> Currently, we should write 2 files (.c and .eo) per class at least.
>> However, vala with eo backend only requires 1 vala file.
>>
>> For example,
>>
>> public class Elm.Button : Elm.Layout, Efl.Ui.Clickable,
>> Elm.Interface.Atspi_Widget_Action
>> {
>>/* elm_widget_button.h, contents of private header */
>>private double ar_initial_timeout;
>>private double ar_gap_timeout;
>>private Ecore.Timer? timer; // question mark means nullable
>>private bool repeating;
>>
>>/* events */
>>public signal void clicked();
>>public signal void repeated();
>>
>>/* elm_button.c, property setter/getter body */
>>public bool autorepeat {
>>   set {
>>  timer = null; // To assign null to 'timer' will unref timer.
>>  autorepeat = value;
>>  repeating = false;
>>   }
>>   get {
>>  return autorepeat & admits_autorepeat;
>>}
>>}
>>
>>/* elm_button.c, private function body */
>>private void activate() {
>>   timer = null;
>>   repeating = false;
>>   /* if property getter is set, the next condition will be (!disabled
>> && !freeze_events) */
>>   if (!disabled_get() && !freeze_events_get())
>>  clicked(); // invokes callbacks for "clicked" events
>>}
>>
>>/* elm_button.c, override Efl.Canvas.Group.group_add() */
>>public override group_add() {
>>   base.group_add(); // efl_super
>>   sub_object_parent_add();
>>
>>   /* lambda expression */
>>   resize_obj.signal_callback_add("elm,action,click", "*", (emission,
>> source) =>
>>   {
>>  activate();
>>   });
>>
>>   access_object_register(resize_obj);
>>   can_focus_set(true);
>>
>>   theme_set("button", "base", style_get());
>>}
>>...
>> }
>>
>> With vala file like above, valac (vala compiler) with eo backend will be
>> able to generate several files we need. (public header, private header, c
>> file including .c and .eo.c contents)
>> Moreover, header and c files generated by valac are simple c source files,
>> so they can be compiled with existing code or c file written in c from the
>> beginning (not generated).
>> I know all EFL developers are C expert, and you may never feel need of
>> redundant tools except for C. However I think if you want EFL to advance
>> further and continuously, we should investigate how we can adapt modern
>> concepts, knowledge and ideas on our works.
>>
>> It's just a suggestion, but if there is any one interested in this idea, we
>> can start new project for the future. :D
>
> I was wondering when you would go public with your idea :)
> Will you publish your current code somewhere? You have a private repo on
> git.e.org.
>
> I think this is really cool as it seems to generate a (almost?)
> zero-overhead binding in a friendly language.
> I know nothing about C# or Vala, although I know they only look similar,
> they are not the same language.

I haven't played myself with Vala, but the example you are sharing
with us is quite nice. In general my position hasn't changed, we must
support as many language as possible and as well as possible. That is
the point of our work on EFL interface and moving so massively to eo.
So I would welcome a new binding like vala to sit in efl/src/bindings
along with c++, js and lua (I also hope to see one day Python and many
others there). Please share your work with us !

> I doubt we would use this inside the EFL codebase itself but I can
> definitely see the value in a new language binding.

I agree with you on this completely.

> If only the EFL interfaces could be completed already...

I also agree on this. Hopefully we will be done some time next year.
-- 
Cedric BAIL


[EGIT] [core/efl] master 01/01: evas: wait on one specific task to be done.

2016-12-07 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 8205051ff6a4911b387d5500d936d45b05c9d511
Author: Cedric BAIL 
Date:   Wed Dec 7 11:17:01 2016 -0800

evas: wait on one specific task to be done.

This prevent dead lock.
---
 src/lib/evas/cache/evas_cache_image.c | 4 +++-
 src/lib/evas/cache/evas_preload.c | 7 +++
 src/lib/evas/include/evas_private.h   | 1 +
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/cache/evas_cache_image.c 
b/src/lib/evas/cache/evas_cache_image.c
index 152cea6..9cf9e97 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -1197,13 +1197,15 @@ evas_cache_image_load_data(Image_Entry *im)
  evas_preload_thread_cancel(im->preload);
   }
 evas_async_events_process();
-
+evas_preload_pthread_wait(im->preload, 0.01);
+
 LKL(wakeup);
 while (im->flags.preload_pending)
   {
  eina_condition_wait(&cond_wakeup);
  LKU(wakeup);
  evas_async_events_process();
+ evas_preload_pthread_wait(im->preload, 0.01);
  LKL(wakeup);
   }
 LKU(wakeup);
diff --git a/src/lib/evas/cache/evas_preload.c 
b/src/lib/evas/cache/evas_preload.c
index 9ad2f35..f400a71 100644
--- a/src/lib/evas/cache/evas_preload.c
+++ b/src/lib/evas/cache/evas_preload.c
@@ -138,3 +138,10 @@ evas_preload_thread_cancelled_is(Evas_Preload_Pthread 
*work)
if (!work) return EINA_FALSE;
return ecore_thread_check(work->thread);
 }
+
+Eina_Bool
+evas_preload_pthread_wait(Evas_Preload_Pthread *work, double wait)
+{
+   if (!work) return EINA_TRUE;
+   return ecore_thread_wait(work->thread, wait);
+}
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 8e15337..26ea5c5 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1952,6 +1952,7 @@ Evas_Preload_Pthread *evas_preload_thread_run(void 
(*func_heavy)(void *data),
   const void *data);
 Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
 Eina_Bool evas_preload_thread_cancelled_is(Evas_Preload_Pthread *thread);
+Eina_Bool evas_preload_pthread_wait(Evas_Preload_Pthread *work, double wait);
 
 void _evas_walk(Evas_Public_Data *e_pd);
 void _evas_unwalk(Evas_Public_Data *e_pd);

-- 




Re: [E-devel] eo_isa() buggy

2016-12-07 Thread Gustavo Sverzut Barbieri
On Wed, Dec 7, 2016 at 12:00 PM, Tom Hacohen  wrote:
> Hey,
>
> I just pushed 5424cdbd810042ba59e71bec6b8d91cb6a2c3e9c that I hope
> should fix it. This commit fixes a bug I've known for a while and just
> forgot to fix. From your description, I believe it is the same issue,
> but please verify.
>
> Thanks for reporting.

great fix, but didn't fix my issue yet. Try with the
efl_net_dialer_simple_example using SSL:

./src/examples/ecore/efl_net_dialer_simple_example ssl localhost:1234

This uses:

Efl.Net.Dialer.Ssl -> Efl.Net.Dialer, Efl.Net.Socket.Ssl

Efl.Net.Dialer -> Efl.Net.Socket -> Efl.Io.Reader, Efl.Io.Writer

Efl.Net.Socket.Ssl -> Efl.Loop_User, Efl.Net.Socket -> Efl.Io.Reader,
Efl.Io.Writer

what's funny is that it works for other complex hierarchies, such as:

Efl.Net.Dialer.Tcp -> Efl.Net.Dialer, Efl.Net.Socket.Tcp

Efl.Net.Socket.Tcp -> Efl.Net.Socket.Fd -> Efl.Loop_Fd. Efl.Net.Socket
-> Efl.Io.Reader, Efl.Io.Writer

as you can see, it's even more complex since uses Efl.Net.Socket.Fd!


-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: gl_drm: simplify outbuf_reconfigure

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit 661e44c38d4dc9fd8c82fb3b49189ae3bebae0bf
Author: Derek Foreman 
Date:   Wed Dec 7 15:53:08 2016 -0600

gl_drm: simplify outbuf_reconfigure

Calling render_engine_software_generic_update from eng_setup lets us
remove a bunch of stuff from evas_outbuf_reconfigure.
---
 src/modules/evas/engines/gl_drm/evas_engine.c |  4 
 src/modules/evas/engines/gl_drm/evas_outbuf.c | 15 ---
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 0b37659..d840e2b 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1018,6 +1018,10 @@ eng_setup(Evas *evas, void *in)
   epd->output.w, epd->output.h,
   info->info.rotation,
   info->info.depth);
+  
evas_render_engine_software_generic_update(&re->generic.software,
+ 
re->generic.software.ob,
+ epd->output.w,
+ epd->output.h);
}
   }
  }
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c 
b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index a26b418..2304889 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -540,19 +540,8 @@ evas_outbuf_unsurf(Outbuf *ob)
 void
 evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth)
 {
-   Evas_Public_Data *epd;
-   Render_Engine *re;
-
if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth;
 
-   epd = efl_data_scope_get(ob->evas, EVAS_CANVAS_CLASS);
-   EINA_SAFETY_ON_NULL_RETURN(epd);
-
-   re = epd->engine.data.output;
-   EINA_SAFETY_ON_NULL_RETURN(re);
-
-   re->generic.software.ob->gl_context->references++;
-
while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
 
_evas_outbuf_gbm_surface_destroy(ob);
@@ -562,10 +551,6 @@ evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, 
Outbuf_Depth depth)
  _evas_outbuf_gbm_surface_create(ob, h, w);
_evas_outbuf_egl_setup(ob);
 
-   evas_render_engine_software_generic_update(&re->generic.software, ob, w, h);
-
-   re->generic.software.ob->gl_context->references--;
-
glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
 }
 

-- 




Re: [E-devel] Pre-release tarballs for efl 1.18.4

2016-12-07 Thread Jean Guyomarc'h
Hi Stefan,

1.18.4 is ready to roll on macOS :)

BR,

Jean

On Wed, Dec 7, 2016 at 4:25 PM, Stefan Schmidt 
wrote:

> Hello.
>
> I just uploaded the pre-release tarballs for 1.18.4.
>
> If I hear nothing problematic within the next 24 hours, I will do the
> final release.
>
> https://download.enlightenment.org/pre-releases/efl-1.18.4-pre.tar.gz
> d19669eece770cc09733568c7dfef9870daa0f8b9f613ab76ad14b2f5de20040
>
> https://download.enlightenment.org/pre-releases/efl-1.18.4-pre.tar.xz
> 39ebc07e37437d6ecdeb0f645783484e28a882b38f7e619ad12c2bf9b5548025
>
> regards
> Stefan Schmidt
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/02: gl_drm: Query eglGetProcAddress with dlsym

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit cef41ae70a1c11565e1016debf6ce24ca259498d
Author: Derek Foreman 
Date:   Wed Dec 7 16:39:17 2016 -0600

gl_drm: Query eglGetProcAddress with dlsym

eglGetProcAddress should be queried with dlsym unconditionally.  What we
had could query it with other extended forms of eglGetProcAddress, which
is probably not what anyone wants.

Also, throwing away the weird extended forms because there's a good chance
our other gl bits don't run on any stacks that don't support normal
eglGetProcAddress.
---
 src/modules/evas/engines/gl_drm/evas_engine.c | 13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index d840e2b..4821baa 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -206,17 +206,10 @@ gl_symbols(void)
LINK2GENERIC(evgl_engine_shutdown);
LINK2GENERIC(evas_gl_symbols);
 
+   LINK2GENERIC(eglGetProcAddress);
+
 #define FINDSYM(dst, sym, typ) \
-   if (glsym_eglGetProcAddress) { \
-  if (!dst) dst = (typ)glsym_eglGetProcAddress(sym); \
-   } else { \
-  if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym); \
-   }
-
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressKHR", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressEXT", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressARB", glsym_func_eng_fn);
-   FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddress", glsym_func_eng_fn);
+   if (!dst) dst = (typ)glsym_eglGetProcAddress(sym);
 
glsym_evas_gl_symbols((void*)glsym_eglGetProcAddress);
 

-- 




[EGIT] [core/efl] master 02/02: gl_drm: Only use dmabuf if the extension is present

2016-12-07 Thread Derek Foreman
derekf pushed a commit to branch master.

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

commit da5f41723aa3714a3a3faef59270066bdab2f11b
Author: Derek Foreman 
Date:   Wed Dec 7 16:41:34 2016 -0600

gl_drm: Only use dmabuf if the extension is present

Need to check for the extension string instead of just the presence of the
function pointers.
---
 src/modules/evas/engines/gl_drm/evas_engine.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 4821baa..be082d6 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -30,6 +30,7 @@ int _extn_have_buffer_age = 1;
 
 /* local variables */
 static Eina_Bool initted = EINA_FALSE;
+static Eina_Bool dmabuf_present = EINA_FALSE;
 static int gl_wins = 0;
 
 /* local function prototype types */
@@ -269,6 +270,8 @@ gl_extn_veto(Render_Engine *re)
 
 if (!strstr(str, "EGL_EXT_swap_buffers_with_damage"))
   glsym_eglSwapBuffersWithDamage = NULL;
+if (strstr(str, "EGL_MESA_image_dma_buf_export"))
+  dmabuf_present = EINA_TRUE;
  }
else
  {
@@ -624,6 +627,7 @@ import_simple_dmabuf(EGLDisplay display, struct 
dmabuf_attributes *attributes)
EGLAttrib attribs[30];
int atti = 0;
 
+   if (!dmabuf_present) return NULL;
if (!glsym_eglCreateImage && !glsym_eglCreateImageKHR) return NULL;
 
/* This requires the Mesa commit in

-- 




[EGIT] [core/efl] master 02/02: evas: do not rely on Evas canvas no longer passed during setup.

2016-12-07 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 386e06c73c091a4aaf10f654bfd12f82e61ea4b6
Author: Cedric BAIL 
Date:   Wed Dec 7 15:44:43 2016 -0800

evas: do not rely on Evas canvas no longer passed during setup.
---
 src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c  |  4 
 src/modules/evas/engines/fb/Evas_Engine_FB.h   |  6 +++---
 src/modules/evas/engines/fb/evas_engine.c  | 10 ++
 .../evas/engines/software_x11/Evas_Engine_Software_X11.h   |  6 --
 src/modules/evas/engines/software_x11/evas_engine.c|  4 ++--
 5 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c 
b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
index 0885162..9f0665c 100644
--- a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
+++ b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
@@ -745,6 +745,7 @@ ecore_evas_vnc_server_new(Ecore_Evas *ee, int port, const 
char *addr,
 
 x11_engine = (Evas_Engine_Info_Software_X11 *)engine;
 x11_engine->func.region_push_hook = _ecore_evas_vnc_server_draw;
+x11_engine->push_to = ee->evas;
 engine_set = EINA_TRUE;
 key_info_get_func = _ecore_evas_vnc_server_x11_key_info_get;
  }
@@ -757,6 +758,7 @@ ecore_evas_vnc_server_new(Ecore_Evas *ee, int port, const 
char *addr,
 
 fb_engine = (Evas_Engine_Info_FB *)engine;
 fb_engine->func.region_push_hook = _ecore_evas_vnc_server_draw;
+fb_engine->push_to = ee->evas;
 engine_set = EINA_TRUE;
 key_info_get_func = _ecore_evas_vnc_server_fb_key_info_get;
  }
@@ -864,6 +866,7 @@ ecore_evas_vnc_server_del(Ecore_Evas_Vnc_Server *server)
 
 x11_engine = (Evas_Engine_Info_Software_X11 *)engine;
 x11_engine->func.region_push_hook = NULL;
+x11_engine->push_to = NULL;
  }
 #endif
 #ifdef BUILD_ENGINE_FB
@@ -873,6 +876,7 @@ ecore_evas_vnc_server_del(Ecore_Evas_Vnc_Server *server)
 
 fb_engine = (Evas_Engine_Info_FB *)engine;
 fb_engine->func.region_push_hook = NULL;
+fb_engine->push_to = NULL;
  }
 #endif
 
diff --git a/src/modules/evas/engines/fb/Evas_Engine_FB.h 
b/src/modules/evas/engines/fb/Evas_Engine_FB.h
index 12c5067..4c43096 100644
--- a/src/modules/evas/engines/fb/Evas_Engine_FB.h
+++ b/src/modules/evas/engines/fb/Evas_Engine_FB.h
@@ -21,9 +21,9 @@ struct _Evas_Engine_Info_FB
Evas_Engine_Render_Mode render_mode;
 
struct {
-  void (*region_push_hook)(Evas *e, int x, int y, int w, int h, const void 
*pixels);
+  void (*region_push_hook)(Evas *push_to, int x, int y, int w, int h, 
const void *pixels);
} func;
+
+   Evas *push_to;
 };
 #endif
-
-
diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index 79e670e..811cee6 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -87,9 +87,10 @@ evas_fb_region_push_hook_call(Outbuf *buf, int x, int y, int 
w, int h,
 
 /* internal engine routines */
 static void *
-_output_setup(Evas *eo_e, int w, int h, int rot, int vt, int dev, int refresh,
+_output_setup(int w, int h, int rot, int vt, int dev, int refresh,
   void (*region_push_hook)(Evas *e, int x, int y, int w, int h,
-   const void *pixels))
+   const void *pixels),
+  Evas *push_to)
 {
Render_Engine *re;
Outbuf *ob;
@@ -105,7 +106,7 @@ _output_setup(Evas *eo_e, int w, int h, int rot, int vt, 
int dev, int refresh,
if (!ob) goto on_error;
 
ob->region_push_hook.cb = region_push_hook;
-   ob->region_push_hook.evas = eo_e;
+   ob->region_push_hook.evas = push_to;
if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
  evas_fb_outbuf_fb_get_rot,
  evas_fb_outbuf_fb_reconfigure,
@@ -164,7 +165,8 @@ eng_setup(void *in, unsigned int w, unsigned int h)
 info->info.virtual_terminal,
 info->info.device_number,
 info->info.refresh,
-info->func.region_push_hook);
+info->func.region_push_hook,
+info->push_to);
 }
 
 static void
diff --git a/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h 
b/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
index f13e55f..0917f08 100644
--- a/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
+++ b/src/modules/evas/engines/software_x11/Evas_Engine_Software_X11.h
@@ -35,14 +35,16 @@ struct _Evas_Engine_Info_Software_X11
  } info;
 
/* engine specific function calls to query stuff about the destinat

[EGIT] [core/efl] master 01/02: evas: refactor setup stage and reduce complexity for engine.

2016-12-07 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 73b308fb66f871b93ef8e324997872e3bf175906
Author: Cedric BAIL 
Date:   Fri Dec 2 15:30:02 2016 -0800

evas: refactor setup stage and reduce complexity for engine.
---
 src/lib/evas/canvas/evas_main.c|  38 ++-
 src/lib/evas/include/evas_private.h|   3 +-
 src/modules/evas/engines/buffer/evas_engine.c  |  47 ++-
 src/modules/evas/engines/drm/evas_engine.c |  50 ++--
 src/modules/evas/engines/eglfs/evas_engine.c   | 236 +++
 src/modules/evas/engines/fb/evas_engine.c  |  30 +-
 src/modules/evas/engines/gl_cocoa/evas_engine.c| 135 -
 src/modules/evas/engines/gl_drm/evas_engine.c  | 279 -
 src/modules/evas/engines/gl_drm/evas_engine.h  |   2 -
 src/modules/evas/engines/gl_sdl/evas_engine.c  |  25 +-
 src/modules/evas/engines/gl_x11/evas_engine.c  | 332 ++---
 src/modules/evas/engines/gl_x11/evas_engine.h  |   6 +-
 src/modules/evas/engines/gl_x11/evas_x_main.c  |  24 +-
 src/modules/evas/engines/psl1ght/evas_engine.c |  19 +-
 .../evas/engines/software_ddraw/evas_engine.c  |  48 +--
 .../evas/engines/software_gdi/evas_engine.c|  76 +++--
 .../evas/engines/software_generic/evas_engine.c|   3 +-
 .../evas/engines/software_x11/evas_engine.c| 198 ++--
 src/modules/evas/engines/wayland_egl/evas_engine.c | 286 +-
 src/modules/evas/engines/wayland_shm/evas_engine.c |  64 ++--
 20 files changed, 879 insertions(+), 1022 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 269d329..b499dcf 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -420,22 +420,44 @@ _evas_canvas_engine_info_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e)
 }
 
 EOLIAN static Eina_Bool
-_evas_canvas_engine_info_set(Eo *eo_e, Evas_Public_Data *e, Evas_Engine_Info 
*info)
+_evas_canvas_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, 
Evas_Engine_Info *info)
 {
-   Eina_Bool res;
-
if (!info) return EINA_FALSE;
if (info != e->engine.info) return EINA_FALSE;
if (info->magic != e->engine.info_magic) return EINA_FALSE;
 
evas_canvas_async_block(e);
-   if (!e->common_init)
+
+   if (e->engine.data.output)
  {
-e->common_init = 1;
-evas_common_init();
+if (e->engine.func->update)
+  {
+ e->engine.func->update(e->engine.data.output, info, e->output.w, 
e->output.h);
+  }
+else
+  {
+ // For engine who do not provide an update function
+ e->engine.func->output_free(e->engine.data.output);
+
+ goto setup;
+  }
  }
-   res = e->engine.func->setup(eo_e, info);
-   return res;
+   else
+ {
+if (!e->common_init)
+  {
+ e->common_init = 1;
+ evas_common_init();
+  }
+
+ setup:
+e->engine.data.output = e->engine.func->setup(info, e->output.w, 
e->output.h);
+ }
+
+   if (!e->engine.data.context)
+ e->engine.data.context = 
e->engine.func->context_new(e->engine.data.output);
+
+   return !!e->engine.data.output;
 }
 
 EOLIAN static Evas_Coord
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 26ea5c5..d5645fc 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1339,7 +1339,8 @@ struct _Evas_Func
 {
void *(*info)   (Evas *e);
void (*info_free)   (Evas *e, void *info);
-   int  (*setup)   (Evas *e, void *info);
+   void *(*setup)  (void *info, unsigned int w, 
unsigned int h);
+   int  (*update)  (void *data, void *info, unsigned 
int w, unsigned int h);
 
void (*output_free) (void *data);
void (*output_resize)   (void *data, int w, int h);
diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index fcdd184..b838d99 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -29,7 +29,6 @@ static void *_output_setup(int w, int h, void *dest_buffer, 
int dest_buffer_row_
 
 static void *eng_info(Evas *eo_e EINA_UNUSED);
 static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info);
-static int eng_setup(Evas *eo_e, void *info);
 static void eng_output_free(void *data);
 
 /* internal engine routines */
@@ -132,35 +131,25 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info)
free(in);
 }
 
-static int
-eng_setup(Evas *eo_e, void *in)
+static void *
+eng_setup(void *in, unsigned int w, unsigned int h)
 {
-   Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
-   Render

[EGIT] [core/efl] master 01/01: evas fb engine - fix build break cedric added...

2016-12-07 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit fb3fca50c1cac407bb2541f6f7bc9171616494d2
Author: Carsten Haitzler (Rasterman) 
Date:   Thu Dec 8 10:19:23 2016 +0900

evas fb engine - fix build break cedric added...
---
 src/modules/evas/engines/fb/evas_engine.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index 811cee6..b144c8a 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -31,9 +31,10 @@ typedef struct _Region_Push_Hook_Ctx {
 } Region_Push_Hook_Ctx;
 
 /* prototypes we will use here */
-static void *_output_setup(Evas *eo_e, int w, int h, int rot, int vt, int dev, 
int refresh,
+static void *_output_setup(int w, int h, int rot, int vt, int dev, int refresh,
void (*region_push_hook)(Evas *e, int x, int y, int 
w, int h,
-const void *pixels));
+const void *pixels),
+   Evas *push_to);
 
 static void *eng_info(Evas *eo_e);
 static void eng_info_free(Evas *eo_e, void *info);

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/02: gl_drm: Query eglGetProcAddress with dlsym

2016-12-07 Thread Jean-Philippe André
Hey Derek,

On 8 December 2016 at 07:41, Derek Foreman  wrote:
>
> commit cef41ae70a1c11565e1016debf6ce24ca259498d
> Author: Derek Foreman 
> Date:   Wed Dec 7 16:39:17 2016 -0600
>
> gl_drm: Query eglGetProcAddress with dlsym
>
> eglGetProcAddress should be queried with dlsym unconditionally.  What
> we
> had could query it with other extended forms of eglGetProcAddress,
> which
> is probably not what anyone wants.
>
> Also, throwing away the weird extended forms because there's a good
> chance
> our other gl bits don't run on any stacks that don't support normal
> eglGetProcAddress.
>
>
As you know eglGetProcAddress may not return NULL even if the extension is
not supported.
We should refactor the whole thing to check the extensions string (after
using a valid client context) before even calling eglGetProcAddress. That
would avoid extra flags like in your other patch "gl_drm: Only use dmabuf
if the extension is present".

Best regards,

-- 
Jean-Philippe André
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/02: evas: refactor setup stage and reduce complexity for engine.

2016-12-07 Thread Jean-Philippe André
Cedric,

Please at least compile your code before pushing it.
gl_drm is badly broken. I wouldn't be surprised if cocoa and windows
engines are also broken now.


On 8 December 2016 at 08:48, Cedric BAIL  wrote:

> cedric pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=
> 73b308fb66f871b93ef8e324997872e3bf175906
>
> commit 73b308fb66f871b93ef8e324997872e3bf175906
> Author: Cedric BAIL 
> Date:   Fri Dec 2 15:30:02 2016 -0800
>
> evas: refactor setup stage and reduce complexity for engine.
> ---
>  src/lib/evas/canvas/evas_main.c|  38 ++-
>  src/lib/evas/include/evas_private.h|   3 +-
>  src/modules/evas/engines/buffer/evas_engine.c  |  47 ++-
>  src/modules/evas/engines/drm/evas_engine.c |  50 ++--
>  src/modules/evas/engines/eglfs/evas_engine.c   | 236 +++
>  src/modules/evas/engines/fb/evas_engine.c  |  30 +-
>  src/modules/evas/engines/gl_cocoa/evas_engine.c| 135 -
>  src/modules/evas/engines/gl_drm/evas_engine.c  | 279
> -
>  src/modules/evas/engines/gl_drm/evas_engine.h  |   2 -
>  src/modules/evas/engines/gl_sdl/evas_engine.c  |  25 +-
>  src/modules/evas/engines/gl_x11/evas_engine.c  | 332
> ++---
>  src/modules/evas/engines/gl_x11/evas_engine.h  |   6 +-
>  src/modules/evas/engines/gl_x11/evas_x_main.c  |  24 +-
>  src/modules/evas/engines/psl1ght/evas_engine.c |  19 +-
>  .../evas/engines/software_ddraw/evas_engine.c  |  48 +--
>  .../evas/engines/software_gdi/evas_engine.c|  76 +++--
>  .../evas/engines/software_generic/evas_engine.c|   3 +-
>  .../evas/engines/software_x11/evas_engine.c| 198 ++--
>  src/modules/evas/engines/wayland_egl/evas_engine.c | 286
> +-
>  src/modules/evas/engines/wayland_shm/evas_engine.c |  64 ++--
>  20 files changed, 879 insertions(+), 1022 deletions(-)
>
> diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_
> main.c
> index 269d329..b499dcf 100644
> --- a/src/lib/evas/canvas/evas_main.c
> +++ b/src/lib/evas/canvas/evas_main.c
> @@ -420,22 +420,44 @@ _evas_canvas_engine_info_get(Eo *eo_e EINA_UNUSED,
> Evas_Public_Data *e)
>  }
>
>  EOLIAN static Eina_Bool
> -_evas_canvas_engine_info_set(Eo *eo_e, Evas_Public_Data *e,
> Evas_Engine_Info *info)
> +_evas_canvas_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e,
> Evas_Engine_Info *info)
>  {
> -   Eina_Bool res;
> -
> if (!info) return EINA_FALSE;
> if (info != e->engine.info) return EINA_FALSE;
> if (info->magic != e->engine.info_magic) return EINA_FALSE;
>
> evas_canvas_async_block(e);
> -   if (!e->common_init)
> +
> +   if (e->engine.data.output)
>   {
> -e->common_init = 1;
> -evas_common_init();
> +if (e->engine.func->update)
> +  {
> + e->engine.func->update(e->engine.data.output, info,
> e->output.w, e->output.h);
> +  }
> +else
> +  {
> + // For engine who do not provide an update function
> + e->engine.func->output_free(e->engine.data.output);
> +
> + goto setup;
> +  }
>   }
> -   res = e->engine.func->setup(eo_e, info);
> -   return res;
> +   else
> + {
> +if (!e->common_init)
> +  {
> + e->common_init = 1;
> + evas_common_init();
> +  }
> +
> + setup:
> +e->engine.data.output = e->engine.func->setup(info, e->output.w,
> e->output.h);
> + }
> +
> +   if (!e->engine.data.context)
> + e->engine.data.context = e->engine.func->context_new(e-
> >engine.data.output);
> +
> +   return !!e->engine.data.output;
>  }
>
>  EOLIAN static Evas_Coord
> diff --git a/src/lib/evas/include/evas_private.h
> b/src/lib/evas/include/evas_private.h
> index 26ea5c5..d5645fc 100644
> --- a/src/lib/evas/include/evas_private.h
> +++ b/src/lib/evas/include/evas_private.h
> @@ -1339,7 +1339,8 @@ struct _Evas_Func
>  {
> void *(*info)   (Evas *e);
> void (*info_free)   (Evas *e, void *info);
> -   int  (*setup)   (Evas *e, void *info);
> +   void *(*setup)  (void *info, unsigned int w,
> unsigned int h);
> +   int  (*update)  (void *data, void *info,
> unsigned int w, unsigned int h);
>
> void (*output_free) (void *data);
> void (*output_resize)   (void *data, int w, int h);
> diff --git a/src/modules/evas/engines/buffer/evas_engine.c
> b/src/modules/evas/engines/buffer/evas_engine.c
> index fcdd184..b838d99 100644
> --- a/src/modules/evas/engines/buffer/evas_engine.c
> +++ b/src/modules/evas/engines/buffer/evas_engine.c
> @@ -29,7 +29,6 @@ static void *_output_setup(int w, int h, void
> *dest_buffer, int dest_buffer_row_
>
>  static void *eng_info(Evas *eo_e EINA_UNUSED);
>  static void eng_info_free(Evas

[EGIT] [core/efl] master 01/01: efreet_desktop: fix potential error in efreet_desktop_cache_create

2016-12-07 Thread Sungtaek Hong
hermet pushed a commit to branch master.

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

commit 3f0963f7b020bd83da348615e7582ebef1a4a5d0
Author: Sungtaek Hong 
Date:   Thu Dec 8 13:26:55 2016 +0900

efreet_desktop: fix potential error in efreet_desktop_cache_create

Summary:
 - old_file_ids is freed but not set as NULL.
   If it goes to error code, old_file_ids will be freed again.

Reviewers: jpeg, cedric, Hermet

Reviewed By: Hermet

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4467
---
 src/bin/efreet/efreet_desktop_cache_create.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/efreet/efreet_desktop_cache_create.c 
b/src/bin/efreet/efreet_desktop_cache_create.c
index c6b1877..fe4a476 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -504,6 +504,7 @@ main(int argc, char **argv)
 {
 eina_hash_free(old_file_ids->hash);
 free(old_file_ids);
+old_file_ids = NULL;
 }
 
 eina_hash_free(file_ids);

-- 




[EGIT] [core/efl] master 01/01: access: do not count initted if elm_modapi_init() is fail

2016-12-07 Thread Jonghee Choi
hermet pushed a commit to branch master.

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

commit 88e7606b3926ea525233f7298a90fa01cf8c54a4
Author: Jonghee Choi 
Date:   Thu Dec 8 13:28:39 2016 +0900

access: do not count initted if elm_modapi_init() is fail

Summary:
When _access_init was called, initted will be increased always even though 
failed to initialize.
This patch will fix this problem.

Signed-off-by: Jonghee Choi 
Signed-off-by: Minkyu Kang 

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: joi.choi, jpeg

Differential Revision: https://phab.enlightenment.org/D4466
---
 src/lib/elementary/elm_access.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_access.c b/src/lib/elementary/elm_access.c
index 27beaa5..20117b9 100644
--- a/src/lib/elementary/elm_access.c
+++ b/src/lib/elementary/elm_access.c
@@ -161,12 +161,14 @@ static void
 _access_init(void)
 {
Elm_Module *m;
-   initted++;
-   if (initted > 1) return;
+
+   if (initted > 0) return;
if (!(m = _elm_module_find_as("access/api"))) return;
+   if (m->init_func(m) < 0) return;
+   initted++;
+
m->api = malloc(sizeof(Mod_Api));
if (!m->api) return;
-   m->init_func(m);
((Mod_Api *)(m->api)  )->out_read = // called to read out some text
   _elm_module_symbol_get(m, "out_read");
((Mod_Api *)(m->api)  )->out_read_done = // called to set a done marker 
so when it is reached the done callback is called

-- 




[EGIT] [core/efl] master 01/01: Edje: remove a unreachable code from edje_text.c

2016-12-07 Thread Youngbok Shin
hermet pushed a commit to branch master.

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

commit 835c8d1b77ac100cb92876fb447879427c484428
Author: Youngbok Shin 
Date:   Thu Dec 8 13:31:04 2016 +0900

Edje: remove a unreachable code from edje_text.c

Summary:
If "text" is NULL, it is set as empty string in the above code.
So, the removed line is unreachable.

Test Plan: N/A

Reviewers: raster, cedric, herdsman, woohyun, jpeg, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4462
---
 src/lib/edje/edje_text.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 517cdab..33b83f4 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -297,7 +297,6 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
_edje_calc_params_need_type_text(params);
if (params->type.text->size)
  size = params->type.text->size;
-   if (!text) text = "";
 
if ((text == ep->typedata.text->cache.in_str)
|| (text && ep->typedata.text->cache.in_str && 
!strcmp(ep->typedata.text->cache.in_str, text)))

-- 




[EGIT] [tools/eflete] master 03/03: project_manager: add backslash in the edje_pick command line.

2016-12-07 Thread Jaehwan Kim
jaehwan pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=f2c943d6344565ac73d64c4de471902c80109cd2

commit f2c943d6344565ac73d64c4de471902c80109cd2
Author: Jaehwan Kim 
Date:   Thu Dec 8 14:39:01 2016 +0900

project_manager: add backslash in the edje_pick command line.

Some group has a '&' in the style name like "on&off".
---
 src/bin/common/string_common.c | 24 
 src/bin/common/string_common.h |  3 +++
 src/bin/project_manager/project_manager2.c |  5 -
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/src/bin/common/string_common.c b/src/bin/common/string_common.c
index 5fd8cf4..a11e825 100644
--- a/src/bin/common/string_common.c
+++ b/src/bin/common/string_common.c
@@ -98,6 +98,30 @@ string_rstr(const char *str1, const char *str2)
return NULL;
 }
 
+char *
+string_backslash_insert(const char *str, char src)
+{
+   assert(str != NULL);
+   char dst[256];
+   int i = 0;
+
+   while (*str != '\0')
+ {
+if (*str != src)
+  dst[i] = *str;
+else
+  {
+ dst[i++] = '\\';
+ dst[i] = src;
+  }
+str++;
+i++;
+ }
+   dst[i] = '\0';
+
+   return strdup(dst);
+}
+
 /**
  * ref http://docs.enlightenment.org/auto/edje/group__Edje__Object__Part.html
  */
diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h
index 1cf6751..d4cb837 100644
--- a/src/bin/common/string_common.h
+++ b/src/bin/common/string_common.h
@@ -66,6 +66,9 @@ string_cat(const char *str1, const char *str2);
 const char *
 string_rstr(const char *str1, const char *str2);
 
+char *
+string_backslash_insert(const char *str, char src);
+
 const char *
 part_type_text_get(Edje_Part_Type part_type);
 
diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index d13d8b2..90b1eef 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -820,6 +820,7 @@ _project_import_edj(Project_Process_Data *ppd)
Evas_Object *obj = NULL;
Eina_Strbuf *strbuf;
char buf[PATH_MAX];
+   char *str;
unsigned int count;
 
//Eina_Stringshare *msg = eina_stringshare_printf(_("Start import '%s' file 
as new project"), ptd->edj);
@@ -892,8 +893,10 @@ _project_import_edj(Project_Process_Data *ppd)
 ppd->edj = eina_stringshare_ref(edj_out);
 ppd->source_edj = eina_stringshare_ref(edj_in);
 
-ecore_exe_pipe_run(eina_strbuf_string_get(strbuf), FLAGS, NULL);
+str = string_backslash_insert(eina_strbuf_string_get(strbuf), '&');
+ecore_exe_pipe_run(str, FLAGS, NULL);
 eina_strbuf_free(strbuf);
+free(str);
 
 ppd->data_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, 
_exe_output_handler, ppd);
 ppd->del_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_edje_pick_finish_handler, ppd);

-- 




[EGIT] [tools/eflete] master 02/03: layout: remove the release note in about.

2016-12-07 Thread Jaehwan Kim
jaehwan pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=0ef8e77d826d777b6f3d7b570be5162038de9ba4

commit 0ef8e77d826d777b6f3d7b570be5162038de9ba4
Author: Jaehwan Kim 
Date:   Thu Dec 8 14:33:55 2016 +0900

layout: remove the release note in about.
---
 data/themes/tizen/widgets/layout.edc | 47 
 1 file changed, 47 deletions(-)

diff --git a/data/themes/tizen/widgets/layout.edc 
b/data/themes/tizen/widgets/layout.edc
index c6858f6..437aae8 100644
--- a/data/themes/tizen/widgets/layout.edc
+++ b/data/themes/tizen/widgets/layout.edc
@@ -2239,53 +2239,6 @@ group { name: "elm/layout/about/default";
 }
  }
   }
-  part { name: "note.label";
- type: TEXT;
- description { state: "default" 0.0;
-align: 0.0 0.0;
-min: 104 13;
-max: 104 13;
-color_class: "genlist_text_tree";
-text {
-   text: "Release Note";
-   font: FN_B;
-   size: 10;
-   align: 0.0 0.5;
-}
-rel1 {
-   relative: 0.0 1.0;
-   offset: 28 14;
-   to_x: "bg";
-   to_y: "site.label";
-}
-rel2.to: "bg";
- }
-  }
-  part { name: "note.text";
- type: TEXT;
- description { state: "default" 0.0;
-fixed: 1 0;
-min: 0 13;
-max: -1 13;
-color_class: "popup_helper_border";
-text {
-   text: "http://xx.xx.xx";;
-   font: FN;
-   size: 10;
-   align: 0.0 0.5;
-}
-rel1 {
-   relative: 1.0 0.0;
-   offset: 47 0;
-   to: "note.label";
-}
-rel2 {
-   offset: -54 0;
-   to_x: "bg";
-   to_y: "note.label";
-}
- }
-  }
}
 }
 

-- 




[EGIT] [tools/eflete] master 01/03: project_navigator: fix typing-error

2016-12-07 Thread Jaehwan Kim
jaehwan pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7dcbe9c01b713d4ad2a2db6257677e6549e5d2d0

commit 7dcbe9c01b713d4ad2a2db6257677e6549e5d2d0
Author: Jaehwan Kim 
Date:   Thu Dec 8 14:32:57 2016 +0900

project_navigator: fix typing-error
---
 src/bin/ui/project_navigator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index fcfb8a1..b6af159 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -698,7 +698,7 @@ _btn_del_group_cb(void *data __UNUSED__,
 if (!_folder_check(prefix, true))
   {
  popup_add(_("Warning: Delete layout"),
-   _("Cann't delete one of those opened layouts. Please, "
+   _("Can't delete one of those opened layouts. Please, "
  "close the layout tab before delete it."),
BTN_CANCEL, NULL, NULL);
  return;
@@ -720,7 +720,7 @@ _btn_del_group_cb(void *data __UNUSED__,
 if (group->edit_object)
   {
  popup_add(_("Warning: Delete layout"),
-   _("Cann't delete the opened layout. Please, "
+   _("Can't delete the opened layout. Please, "
  "close the layout tab before delete it."),
BTN_CANCEL, NULL, NULL);
  return;

-- 




[EGIT] [core/efl] master 01/01: entry: set autocapital mode according to the layout

2016-12-07 Thread Jihoon Kim
jihoon pushed a commit to branch master.

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

commit be7e8f65137e37b781eb4b6b5323360813a79559
Author: Jihoon Kim 
Date:   Thu Dec 8 15:54:48 2016 +0900

entry: set autocapital mode according to the layout
---
 src/lib/elementary/elm_entry.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index db7493c..812b140 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -5116,6 +5116,18 @@ _elm_entry_input_panel_layout_set(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd, Elm_I
edje_object_part_text_input_panel_layout_set
  (sd->entry_edje, "elm.text", (Edje_Input_Panel_Layout)layout);
 
+   switch (layout)
+ {
+  case ELM_INPUT_PANEL_LAYOUT_URL:
+  case ELM_INPUT_PANEL_LAYOUT_EMAIL:
+  case ELM_INPUT_PANEL_LAYOUT_PASSWORD:
+ elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_NONE);
+ break;
+  default:
+ elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+ break;
+ }
+
if (layout == ELM_INPUT_PANEL_LAYOUT_PASSWORD)
  elm_entry_input_hint_set(obj, ((sd->input_hints & 
~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
else if (layout == ELM_INPUT_PANEL_LAYOUT_TERMINAL)
@@ -5135,6 +5147,10 @@ _elm_entry_input_panel_layout_variation_set(Eo *obj 
EINA_UNUSED, Elm_Entry_Data
 
edje_object_part_text_input_panel_layout_variation_set
  (sd->entry_edje, "elm.text", variation);
+
+   if (sd->input_panel_layout == ELM_INPUT_PANEL_LAYOUT_NORMAL &&
+   variation == ELM_INPUT_PANEL_LAYOUT_NORMAL_VARIATION_PERSON_NAME)
+ elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_WORD);
 }
 
 EOLIAN static int

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/02: evas: refactor setup stage and reduce complexity for engine.

2016-12-07 Thread Vincent Torri
i confirm this, the 2 windows engines are broken

On Thu, Dec 8, 2016 at 3:46 AM, Jean-Philippe André  wrote:
> Cedric,
>
> Please at least compile your code before pushing it.
> gl_drm is badly broken. I wouldn't be surprised if cocoa and windows
> engines are also broken now.
>
>
> On 8 December 2016 at 08:48, Cedric BAIL  wrote:
>
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=
>> 73b308fb66f871b93ef8e324997872e3bf175906
>>
>> commit 73b308fb66f871b93ef8e324997872e3bf175906
>> Author: Cedric BAIL 
>> Date:   Fri Dec 2 15:30:02 2016 -0800
>>
>> evas: refactor setup stage and reduce complexity for engine.
>> ---
>>  src/lib/evas/canvas/evas_main.c|  38 ++-
>>  src/lib/evas/include/evas_private.h|   3 +-
>>  src/modules/evas/engines/buffer/evas_engine.c  |  47 ++-
>>  src/modules/evas/engines/drm/evas_engine.c |  50 ++--
>>  src/modules/evas/engines/eglfs/evas_engine.c   | 236 +++
>>  src/modules/evas/engines/fb/evas_engine.c  |  30 +-
>>  src/modules/evas/engines/gl_cocoa/evas_engine.c| 135 -
>>  src/modules/evas/engines/gl_drm/evas_engine.c  | 279
>> -
>>  src/modules/evas/engines/gl_drm/evas_engine.h  |   2 -
>>  src/modules/evas/engines/gl_sdl/evas_engine.c  |  25 +-
>>  src/modules/evas/engines/gl_x11/evas_engine.c  | 332
>> ++---
>>  src/modules/evas/engines/gl_x11/evas_engine.h  |   6 +-
>>  src/modules/evas/engines/gl_x11/evas_x_main.c  |  24 +-
>>  src/modules/evas/engines/psl1ght/evas_engine.c |  19 +-
>>  .../evas/engines/software_ddraw/evas_engine.c  |  48 +--
>>  .../evas/engines/software_gdi/evas_engine.c|  76 +++--
>>  .../evas/engines/software_generic/evas_engine.c|   3 +-
>>  .../evas/engines/software_x11/evas_engine.c| 198 ++--
>>  src/modules/evas/engines/wayland_egl/evas_engine.c | 286
>> +-
>>  src/modules/evas/engines/wayland_shm/evas_engine.c |  64 ++--
>>  20 files changed, 879 insertions(+), 1022 deletions(-)
>>
>> diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_
>> main.c
>> index 269d329..b499dcf 100644
>> --- a/src/lib/evas/canvas/evas_main.c
>> +++ b/src/lib/evas/canvas/evas_main.c
>> @@ -420,22 +420,44 @@ _evas_canvas_engine_info_get(Eo *eo_e EINA_UNUSED,
>> Evas_Public_Data *e)
>>  }
>>
>>  EOLIAN static Eina_Bool
>> -_evas_canvas_engine_info_set(Eo *eo_e, Evas_Public_Data *e,
>> Evas_Engine_Info *info)
>> +_evas_canvas_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e,
>> Evas_Engine_Info *info)
>>  {
>> -   Eina_Bool res;
>> -
>> if (!info) return EINA_FALSE;
>> if (info != e->engine.info) return EINA_FALSE;
>> if (info->magic != e->engine.info_magic) return EINA_FALSE;
>>
>> evas_canvas_async_block(e);
>> -   if (!e->common_init)
>> +
>> +   if (e->engine.data.output)
>>   {
>> -e->common_init = 1;
>> -evas_common_init();
>> +if (e->engine.func->update)
>> +  {
>> + e->engine.func->update(e->engine.data.output, info,
>> e->output.w, e->output.h);
>> +  }
>> +else
>> +  {
>> + // For engine who do not provide an update function
>> + e->engine.func->output_free(e->engine.data.output);
>> +
>> + goto setup;
>> +  }
>>   }
>> -   res = e->engine.func->setup(eo_e, info);
>> -   return res;
>> +   else
>> + {
>> +if (!e->common_init)
>> +  {
>> + e->common_init = 1;
>> + evas_common_init();
>> +  }
>> +
>> + setup:
>> +e->engine.data.output = e->engine.func->setup(info, e->output.w,
>> e->output.h);
>> + }
>> +
>> +   if (!e->engine.data.context)
>> + e->engine.data.context = e->engine.func->context_new(e-
>> >engine.data.output);
>> +
>> +   return !!e->engine.data.output;
>>  }
>>
>>  EOLIAN static Evas_Coord
>> diff --git a/src/lib/evas/include/evas_private.h
>> b/src/lib/evas/include/evas_private.h
>> index 26ea5c5..d5645fc 100644
>> --- a/src/lib/evas/include/evas_private.h
>> +++ b/src/lib/evas/include/evas_private.h
>> @@ -1339,7 +1339,8 @@ struct _Evas_Func
>>  {
>> void *(*info)   (Evas *e);
>> void (*info_free)   (Evas *e, void *info);
>> -   int  (*setup)   (Evas *e, void *info);
>> +   void *(*setup)  (void *info, unsigned int w,
>> unsigned int h);
>> +   int  (*update)  (void *data, void *info,
>> unsigned int w, unsigned int h);
>>
>> void (*output_free) (void *data);
>> void (*output_resize)   (void *data, int w, int h);
>> diff --git a/src/modules/evas/engines/buffer/evas_engine.c
>> b/src/modules/evas/engines/buffer/evas_engine.c
>> index fcdd184..b838d99 100644
>> --- a/src/modules/evas/engines/buffer/evas_engine

[EGIT] [core/efl] master 03/05: eina: Reinstall magic checks on Eina_File

2016-12-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 208e152bafca9165d3dfccb99d96a4308a663ade
Author: Jean-Philippe Andre 
Date:   Thu Dec 8 15:49:03 2016 +0900

eina: Reinstall magic checks on Eina_File

file != NULL does not mean it's valid. Since Eina_File is
a basic eina type a magic check is still better than nothing.
It can avoid doing eina_file_dup() on a closed file for instance.

This "fixes" a crash in eina_file_close with invalid files.

Now I can go hunt the root cause...
---
 src/lib/eina/eina_file_common.c | 33 ++---
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 5cbed8c..34bd7e8 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -60,6 +60,23 @@
 Eina_Hash *_eina_file_cache = NULL;
 Eina_Lock _eina_file_lock_cache;
 
+#if defined(EINA_SAFETY_CHECKS) && defined(EINA_MAGIC_DEBUG)
+# define EINA_FILE_MAGIC_CHECK(f, ...) do { \
+   if (EINA_UNLIKELY((f) == NULL)) \
+ { \
+   EINA_SAFETY_ERROR("safety check failed: " # f " == NULL"); \
+   return __VA_ARGS__; \
+ } \
+   if (EINA_UNLIKELY((f)->__magic != EINA_FILE_MAGIC)) \
+ { \
+EINA_MAGIC_FAIL(f, EINA_FILE_MAGIC); \
+return __VA_ARGS__; \
+ } \
+   } while (0)
+#else
+# define EINA_FILE_MAGIC_CHECK(f, ...) do {} while(0)
+#endif
+
 static char *
 _eina_file_escape(char *path, size_t len)
 {
@@ -446,8 +463,9 @@ eina_file_virtualize(const char *virtual_name, const void 
*data, unsigned long l
 EAPI Eina_Bool
 eina_file_virtual(Eina_File *file)
 {
-   if (file) return file->virtual;
-   return EINA_FALSE;
+   if (!file) return EINA_FALSE;
+   EINA_FILE_MAGIC_CHECK(file, EINA_FALSE);
+   return file->virtual;
 }
 
 EAPI Eina_File *
@@ -457,6 +475,7 @@ eina_file_dup(const Eina_File *f)
 
if (file)
  {
+EINA_FILE_MAGIC_CHECK(f, NULL);
 eina_lock_take(&file->lock);
 file->refcount++;
 eina_lock_release(&file->lock);
@@ -486,7 +505,7 @@ eina_file_close(Eina_File *file)
unsigned int length;
unsigned int key;
 
-   EINA_SAFETY_ON_NULL_RETURN(file);
+   EINA_FILE_MAGIC_CHECK(file);
 
eina_lock_take(&_eina_file_lock_cache);
 
@@ -513,21 +532,21 @@ eina_file_close(Eina_File *file)
 EAPI size_t
 eina_file_size_get(const Eina_File *file)
 {
-   EINA_SAFETY_ON_NULL_RETURN_VAL(file, 0);
+   EINA_FILE_MAGIC_CHECK(file, 0);
return file->length;
 }
 
 EAPI time_t
 eina_file_mtime_get(const Eina_File *file)
 {
-   EINA_SAFETY_ON_NULL_RETURN_VAL(file, 0);
+   EINA_FILE_MAGIC_CHECK(file, 0);
return file->mtime;
 }
 
 EAPI const char *
 eina_file_filename_get(const Eina_File *file)
 {
-   EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
+   EINA_FILE_MAGIC_CHECK(file, NULL);
return file->filename;
 }
 
@@ -622,7 +641,7 @@ eina_file_map_lines(Eina_File *file)
 {
Eina_Lines_Iterator *it;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
+   EINA_FILE_MAGIC_CHECK(file, NULL);
 
if (file->length == 0) return NULL;
 

-- 




[EGIT] [core/efl] master 05/05: theme: Fix crash at app shutdown

2016-12-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 055e905b84c702d746155dbd8f3b655a920a7577
Author: Jean-Philippe Andre 
Date:   Thu Dec 8 16:10:20 2016 +0900

theme: Fix crash at app shutdown

The wrong hash was used to store theme data items. Obviously
this is an API that wasn't used within EFL thus untested. Yay.

@fix
---
 src/lib/elementary/elm_theme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c
index f7a2451..9349fca 100644
--- a/src/lib/elementary/elm_theme.c
+++ b/src/lib/elementary/elm_theme.c
@@ -242,7 +242,7 @@ _elm_theme_find_data_try(Elm_Theme *th, const Eina_File *f, 
const char *key)
free(data);
if (t)
  {
-eina_hash_add(th->cache, key, t);
+eina_hash_add(th->cache_data, key, t);
 return t;
  }
return NULL;

-- 




[EGIT] [core/efl] master 01/05: win: Implement stronger theme compatibility for frame_obj

2016-12-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit bdb4977dda7024f561abf06201219804c2fa64fb
Author: Jean-Philippe Andre 
Date:   Wed Dec 7 19:27:05 2016 +0900

win: Implement stronger theme compatibility for frame_obj

The frame object requires a theme of version 119 or more. In fact
I think until we are totally happy with the window API (for EO) we
might want to bump that version regularly. That would indeed disallow
theme customization for border.edc until it's done.

This patch uses a pretty brute force way to set the theme file to
the default file from EFL installation. elm_config is not reliable
here.

This is very custom made and there may be a more generic way to force
a widget to use a minimum theme version. Yes that could mean ugly
widgets if we change the theme API but at least that would make them
work. Note that the border theme contains no visual elements, so the
colors of the background, etc... should all depend on the user
selected theme. But of course CSD (in Wayland) will have to use the
default theme -- and look grey.

Fixes D4976
---
 data/elementary/themes/edc/elm/bg.edc |  2 +-
 data/elementary/themes/edc/elm/border.edc |  1 +
 data/elementary/themes/edc/elm/win.edc|  2 +-
 src/lib/elementary/efl_ui_win.c   | 84 ++-
 src/lib/elementary/elm_priv.h |  2 +-
 src/lib/elementary/elm_theme.c| 11 ++--
 6 files changed, 82 insertions(+), 20 deletions(-)

diff --git a/data/elementary/themes/edc/elm/bg.edc 
b/data/elementary/themes/edc/elm/bg.edc
index 0254099..ed5034f 100644
--- a/data/elementary/themes/edc/elm/bg.edc
+++ b/data/elementary/themes/edc/elm/bg.edc
@@ -7,7 +7,7 @@
 */
 
 group { name: "elm/bg/base/default";
-   data.item: "elm_bg_version" "119";
+   data.item: "version" "119";
images.image: "bevel_dark_out.png" COMP;
parts {
   part { name: "base"; type: RECT;
diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 3ff013b..18cc44b 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -30,6 +30,7 @@ group { name: "elm/border/base/default";
images.image: "screen_circular_shadow.png" COMP;
images.image: "win_shadow.png" COMP;
data.item: "shadow" "1";
+   data.item: "version" "119";
parts {
   /* opaque region of the window, to inform the compositor */
   spacer { "elm.spacer.opaque";
diff --git a/data/elementary/themes/edc/elm/win.edc 
b/data/elementary/themes/edc/elm/win.edc
index 8c6a08d..a9c98a0 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,5 +1,5 @@
 group { name: "elm/win/base/default";
-   data.item: "elm_win_version" "119";
+   data.item: "version" "119";
parts {
   rect { "client_clip"; nomouse;
  desc { "default";
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 75aa1d0..1dab8de 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -28,6 +28,8 @@
 #define MY_CLASS_NAME "Efl.Ui.Win"
 #define MY_CLASS_NAME_LEGACY "elm_win"
 
+#define FRAME_OBJ_THEME_MIN_VERSION 119
+
 static const Elm_Win_Trap *trap = NULL;
 
 #define TRAP(sd, name, ...) \
@@ -2150,9 +2152,9 @@ static inline Edje_Object *
 _elm_win_modal_blocker_edje_get(Efl_Ui_Win_Data *sd)
 {
/* Legacy theme compatibility */
-   const char *version = edje_object_data_get(sd->legacy.edje, 
"elm_win_version");
+   const char *version = edje_object_data_get(sd->legacy.edje, "version");
int v = version ? atoi(version) : 0;
-   if (v < 119)
+   if (v < FRAME_OBJ_THEME_MIN_VERSION)
  {
 DBG("Detected legacy theme (<1.19) for modal window blocker.");
 return sd->legacy.edje;
@@ -4071,22 +4073,79 @@ _elm_object_part_cursor_set(Evas_Object *obj, 
Evas_Object *edj,
elm_object_sub_cursor_set(sub, obj, cursor);
 }
 
+static char *
+_efl_system_theme_path_get(void)
+{
+   // Find the default theme from EFL install. Quite ugly.
+   const char *sysdir;
+   char *version;
+   char path[PATH_MAX];
+   int v;
+
+   sysdir = elm_theme_system_dir_get();
+   if (!sysdir) return NULL;
+
+   eina_file_path_join(path, PATH_MAX, sysdir, "default.edj");
+   version = edje_file_data_get(path, "version");
+   v = version ? atoi(version) : 0;
+   free(version);
+   if (v < FRAME_OBJ_THEME_MIN_VERSION)
+ {
+ERR("Default system theme is too old, something is wrong with your 
installation of EFL.");
+return NULL;
+ }
+
+   return strdup(path);
+}
+
 static void
 _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
 {
Evas_Object *obj = sd->obj;
-   int w, h, mw, mh;
-   /* short layer; */
+   int w, h, mw, mh, v;
+   const char *version;
 

[EGIT] [core/efl] master 04/05: eina: Set magic type name for Eina_File

2016-12-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit f1d546df5dbdf9c963098e7a1b9ef8724e957eb8
Author: Jean-Philippe Andre 
Date:   Thu Dec 8 15:59:09 2016 +0900

eina: Set magic type name for Eina_File
---
 src/lib/eina/eina_file_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 34bd7e8..8914cb1 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -1051,6 +1051,7 @@ eina_file_init(void)
  }
 
eina_lock_new(&_eina_file_lock_cache);
+   eina_magic_string_set(EINA_FILE_MAGIC, "Eina_File");
 
return EINA_TRUE;
 }

-- 




[EGIT] [core/efl] master 02/05: evas: Don't load wayland engines when running on X

2016-12-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4a67074a67b33b03693013fe268d7373f2b1bf59
Author: Jean-Philippe Andre 
Date:   Thu Dec 8 15:29:43 2016 +0900

evas: Don't load wayland engines when running on X

evas_render_method_lookup calls evas_module_find_type that
in turn actually goes and loads the module. All we wanted to
know was whether the render_method corresponded to one of the
wayland engines.

See 453770137f84afe622156290e7c38d2d1d3845c4
---
 src/lib/evas/canvas/evas_main.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index b499dcf..f4ae8bf 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -999,10 +999,10 @@ evas_output_method_set(Evas *eo_e, int render_method)
/* get the engine info struct */
if (e->engine.func->info) e->engine.info = e->engine.func->info(eo_e);
 
-   //Wayland already handle seats.
-   if (render_method == evas_render_method_lookup("wayland_shm") ||
-   render_method == evas_render_method_lookup("wayland_egl"))
- return;
+   // Wayland already handles seats.
+   if (em->definition && (eina_streq(em->definition->name, "wayland_shm") ||
+  eina_streq(em->definition->name, "wayland_egl")))
+   return;
 
e->default_seat = evas_device_add_full(eo_e, "default", "The default seat",
   NULL, NULL, EVAS_DEVICE_CLASS_SEAT,

--