Re: [E-devel] Edje multiseat support

2016-12-02 Thread The Rasterman
On Sat, 3 Dec 2016 13:26:41 +0900 Carsten Haitzler (The Rasterman)
 said:

> On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly  said:
> 
> lso... this is new:
> 
> i'm seeing e's pointers/cursors getting stuck. it's because mouse out events
> now are missing. tyr mouse over the bottom resize bar on a window, then move
> mouse cursor into the application window above it. cursor still has he resize
> animation thing. it's because mouse,out signal's are missing. this is new in
> the last day or 2. i'm suspecting it may have to do with the new multiseat
> work... i'm digging...

ok. this was added in 484dae76e675318a579e90ac05d4371acc1f8891 october 21. it
seems it's only really become visible recently. 

if (!obj->delete_me) continue;

was wrong in _canvas_event_feed_mouse_out_internal(). no ! there. if the obj is
marked for deletion - skip it... not "is it NOT marked for selection... skip
it" (ie skip if its valid). :)

fixed by 9e8257367df8cf1797ad474b0e8197353651ee5c


> > Hi folks,
> > 
> > now that multiseat is supported up to Evas, we’re working on Edje.
> > 
> > The idea is that a developer would be able to implement an UI that
> > may be used by more than one single seat, properly handling focus,
> > and providing different feedback for different seats action.
> > 
> > Let’s say, different colors on focus, different images when different
> > seat pointers are over, etc.
> > 
> > I’ve done an initial implementation and wrote an example. It’s available
> > on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> > edje_multiseat example (C code + EDC).
> > 
> > To make this possible, a few main changes were done:
> >   *  New signals were added, adding the seat as suffix. So “mouse,in” would
> > be still be emitted, but also “mouse,in,seat1”, for example
> >   * Real Parts now may be focused by multiple seats
> >   * Some actions receive an optional seat parameter. For instance,
> > FOCUS_SET may receive the seat name, or it will consider it's about the
> > default seat.
> >* Since Evas seat devices may have arbitrary names (at least using
> > wayland backend you can name them as you want using udev rules), or set
> > them on programmatic ways, Edje will have custom names for seats, following
> > a well established pattern. So first announced seat will be named “seat1”,
> > the second “seat2”... If an application supports three seats, on EDC you
> > know what signals you should expect. It makes it possible to write general
> > applications (in the sense of not knowing exactly seats beforehand). But
> > let’s say it’s not the case. there is a specific product built in a way
> > that they know exactly which seats are supported and configured their
> > names, or want to check if this seat has pointer, keyboard, or whatever…
> > for this cases, Edje also emits signals saying when devices were added (or
> > removed) and their names. With these names you can use a new Edje function
> > to fetch the Evas device named as “seat1”.
> > 
> > Please let me know about any suggestions or concerns.
> > 
> > I should make a pull request with this initial patchset soon
> > 
> > Thank you
> > 
> > -- 
> > Bruno Dilly
> > ProFUSION embedded systems
> > http://profusion.mobi
> > --
> > Check out the vibrant tech community on one of the world's most 
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 
> 
> -- 
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
> 
> 
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


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


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


[EGIT] [core/efl] master 01/02: evas - more render cache cleanups

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

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

commit 8dd20ad8edc341f033f2a2f876fcbc665a56bdfa
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Dec 3 12:44:57 2016 +0900

evas - more render cache cleanups

i forgot to save this file before git committing... so also delete
update rect del array from render cache.
---
 src/lib/evas/canvas/evas_render.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 23e63a3..5b59205 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -620,6 +620,7 @@ evas_render_object_render_cache_free(Evas_Object *eo_obj 
EINA_UNUSED,
eina_inarray_free(rc->active_objects);
eina_array_free(rc->render_objects);
eina_array_free(rc->snapshot_objects);
+   eina_inarray_free(rc->update_del);
free(rc);
 }
 

-- 




[EGIT] [core/efl] master 02/02: evas - fix out events broken by recent multiseat work

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

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

commit 9e8257367df8cf1797ad474b0e8197353651ee5c
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Dec 3 14:46:21 2016 +0900

evas - fix out events broken by recent multiseat work

this fixes e's poitners to be "sensible" again.
---
 src/lib/evas/canvas/evas_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index 9958f3b..b95e113 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -2506,7 +2506,7 @@ _canvas_event_feed_mouse_out_internal(Evas *eo_e, 
Efl_Input_Pointer_Data *ev)
  {
 Evas_Object_Pointer_Data *obj_pdata;
 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
-if (!obj->delete_me) continue;
+if (obj->delete_me) continue;
 obj_pdata = _evas_object_pointer_data_get(pdata, obj, ev->device);
 if (!obj_pdata)
   {

-- 




[EGIT] [tools/eflete] master 03/03: menu: disable state and item as a status.

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

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

commit 47859cc46e89dfef3879b7363cafc965f7af81dc
Author: Jaehwan Kim 
Date:   Sat Dec 3 13:13:27 2016 +0900

menu: disable state and item as a status.
---
 src/bin/ui/tabs.c  |  6 +-
 src/bin/ui/workspace/group_navigator.c | 10 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 5695f28..2c53632 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -112,7 +112,11 @@ _content_set(void *data,
 tabs.current_workspace = item->content;
 tabs.current_group = item->group;
 if (ap.project)
-  ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_STYLE_ONLY, 
false);
+  {
+ ui_menu_items_list_disable_set(ap.menu, 
MENU_ITEMS_LIST_STYLE_ONLY, false);
+ ui_menu_disable_set(ap.menu, MENU_EDIT_STATE_ADD, true);
+ ui_menu_disable_set(ap.menu, MENU_EDIT_ITEM_ADD, true);
+  }
 if (item->need_recalc)
   {
  workspace_groupview_hard_update(tabs.current_workspace);
diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index b6e229f..5c800cc 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -674,7 +674,9 @@ _unselect_internal(Part_List *pl)
pl->group->current_selected = NULL;
 
elm_object_item_disabled_set(pl->add_state_menu_item, true);
+   ui_menu_disable_set(ap.menu, MENU_EDIT_STATE_ADD, true);
elm_object_item_disabled_set(pl->add_part_item_menu_item, true);
+   ui_menu_disable_set(ap.menu, MENU_EDIT_ITEM_ADD, true);
 
elm_object_disabled_set(pl->btn_del, true);
elm_object_disabled_set(pl->btn_down, true);
@@ -691,10 +693,14 @@ _enable_buttons(Part_List *pl, Elm_Object_Item *glit)
if (pl->part)
  {
 elm_object_item_disabled_set(pl->add_state_menu_item, false);
+ui_menu_disable_set(ap.menu, MENU_EDIT_STATE_ADD, false);
 
 if ((pl->part->type == EDJE_PART_TYPE_BOX) ||
 (pl->part->type == EDJE_PART_TYPE_TABLE))
-  elm_object_item_disabled_set(pl->add_part_item_menu_item, false);
+  {
+ elm_object_item_disabled_set(pl->add_part_item_menu_item, false);
+ ui_menu_disable_set(ap.menu, MENU_EDIT_ITEM_ADD, false);
+  }
  }
if (pl->group->current_selected)
  {
@@ -2602,9 +2608,11 @@ group_navigator_add(Evas_Object *parent, Group2 *group)
pl->add_state_menu_item = elm_menu_item_add(pl->menu, NULL, NULL, 
_("State"), _on_menu_add_state_clicked, NULL);
elm_object_part_text_set(elm_menu_item_object_get(pl->add_state_menu_item), 
"elm.shortcut", "w");
elm_object_item_disabled_set(pl->add_state_menu_item, true);
+   ui_menu_disable_set(ap.menu, MENU_EDIT_STATE_ADD, true);
pl->add_part_item_menu_item = elm_menu_item_add(pl->menu, NULL, NULL, 
_("Item"), _on_menu_add_item_clicked, NULL);

elm_object_part_text_set(elm_menu_item_object_get(pl->add_part_item_menu_item), 
"elm.shortcut", "e");
elm_object_item_disabled_set(pl->add_part_item_menu_item, true);
+   ui_menu_disable_set(ap.menu, MENU_EDIT_ITEM_ADD, true);
 #if !HAVE_TIZEN
elm_menu_item_separator_add(pl->menu, NULL);
 #endif

-- 




[EGIT] [tools/eflete] master 02/03: shortcut: add shortcut about resource manager.

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

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

commit e6d8f0f2c8cd9cea8d44520563d68b45637e79ef
Author: Jaehwan Kim 
Date:   Sat Dec 3 11:35:54 2016 +0900

shortcut: add shortcut about resource manager.
---
 src/bin/ui/menu.c | 12 ++--
 src/bin/ui/tabs.c | 36 
 2 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index 0021e29..52ba9fb 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -183,16 +183,16 @@ _menu_cb(void *data __UNUSED__,
  tabs_home_tab_add(TAB_HOME_OPEN_PROJECT);
  break;
   case MENU_WINDOW_MANAGER_IMAGE:
- image_manager_add();
+ shortcuts_shortcut_send(SHORTCUT_TYPE_TAB_IMAGE_MANAGER);
  break;
   case MENU_WINDOW_MANAGER_SOUND:
- sound_manager_add();
- break;
-  case MENU_WINDOW_MANAGER_COLORCLASS:
- colorclass_manager_add();
+ shortcuts_shortcut_send(SHORTCUT_TYPE_TAB_SOUND_MANAGER);
  break;
   case MENU_WINDOW_MANAGER_TEXT_STYLE:
- style_manager_add();
+ shortcuts_shortcut_send(SHORTCUT_TYPE_TAB_STYLE_MANAGER);
+ break;
+  case MENU_WINDOW_MANAGER_COLORCLASS:
+ shortcuts_shortcut_send(SHORTCUT_TYPE_TAB_COLOR_CLASS_MANAGER);
  break;
   case MENU_HELP_ABOUT:
  about_window_add();
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 1d3c804..5695f28 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -831,6 +831,38 @@ _shortcut_tab_close_cb(void *data __UNUSED__,
 }
 
 static void
+_shortcut_image_manager_cb(void *data __UNUSED__,
+   Evas_Object *obj __UNUSED__,
+   void *event_info __UNUSED__)
+{
+   image_manager_add();
+}
+
+static void
+_shortcut_sound_manager_cb(void *data __UNUSED__,
+   Evas_Object *obj __UNUSED__,
+   void *event_info __UNUSED__)
+{
+   sound_manager_add();
+}
+
+static void
+_shortcut_style_manager_cb(void *data __UNUSED__,
+   Evas_Object *obj __UNUSED__,
+   void *event_info __UNUSED__)
+{
+   style_manager_add();
+}
+
+static void
+_shortcut_color_class_manager_cb(void *data __UNUSED__,
+Evas_Object *obj __UNUSED__,
+void *event_info __UNUSED__)
+{
+   colorclass_manager_add();
+}
+
+static void
 _shortcut_mode_normal_cb(void *data __UNUSED__,
  Evas_Object *obj __UNUSED__,
  void *event_info __UNUSED__)
@@ -1051,6 +1083,10 @@ tabs_add(void)
evas_object_smart_callback_add(ap.win, signals.shortcut.tab.prev, 
_shortcut_tab_prev_cb, NULL);
evas_object_smart_callback_add(ap.win, signals.shortcut.tab.num, 
_shortcut_tab_num_cb, NULL);
evas_object_smart_callback_add(ap.win, signals.shortcut.tab.close, 
_shortcut_tab_close_cb, NULL);
+   evas_object_smart_callback_add(ap.win, signals.shortcut.manager.image, 
_shortcut_image_manager_cb, NULL);
+   evas_object_smart_callback_add(ap.win, signals.shortcut.manager.sound, 
_shortcut_sound_manager_cb, NULL);
+   evas_object_smart_callback_add(ap.win, signals.shortcut.manager.style, 
_shortcut_style_manager_cb, NULL);
+   evas_object_smart_callback_add(ap.win, 
signals.shortcut.manager.color_class, _shortcut_color_class_manager_cb, NULL);
evas_object_smart_callback_add(ap.win, 
signals.shortcut.workspace.mode.normal, _shortcut_mode_normal_cb, NULL);
 #if !HAVE_TIZEN
evas_object_smart_callback_add(ap.win, 
signals.shortcut.workspace.mode.code, _shortcut_mode_code_cb, NULL);

-- 




[EGIT] [tools/eflete] master 01/03: project_navigator: add the option to open the first group automatically.

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

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

commit 220c58eb8f650cada6dc45f10f152265add2c411
Author: Jaehwan Kim 
Date:   Sat Dec 3 10:52:54 2016 +0900

project_navigator: add the option to open the first group automatically.

The user want to the widget more quickly. So they can use --open-group
option to open the first group automatically. If the user open only
one group, this option is more useful.
---
 src/bin/eflete.h   |  1 +
 src/bin/main.c |  5 -
 src/bin/ui/project_navigator.c | 16 ++--
 src/bin/ui/tabs.c  |  2 +-
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/bin/eflete.h b/src/bin/eflete.h
index 768eb33..f39bbce 100644
--- a/src/bin/eflete.h
+++ b/src/bin/eflete.h
@@ -145,6 +145,7 @@ struct _App_Data
This is needed to continue closing 
application after
clicking in save/don't save buttons in 
project close
popup */
+   Eina_Bool open_group : 1;
 #ifdef HAVE_ENVENTOR
Evas_Object *enventor;
Eina_Bool enventor_mode : 1;
diff --git a/src/bin/main.c b/src/bin/main.c
index b100aaa..539a1fe 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -71,6 +71,7 @@ static const Ecore_Getopt options = {
   ECORE_GETOPT_APPEND_METAVAR('d', "dd", "Add data directory for edc 
compilation", "DIR_NAME", ECORE_GETOPT_TYPE_STR),
   ECORE_GETOPT_APPEND_METAVAR('w', "widget", "Add widget to new project or 
import edj-file. Add its styles if the style names are added. Copy its styles 
if the copy style names are added. **rule = 
WIDGET:STYLE[COPY_STYLE,..]{ITEM_STYLE,..[COPY_ITEM_STYLE,..]},..", "(Follow 
the below rule)", ECORE_GETOPT_TYPE_STR),
   ECORE_GETOPT_STORE_TRUE('r', "reopen", "reopen last project"),
+  ECORE_GETOPT_STORE_TRUE('o', "open-group", "open the first group 
automatically"),
   ECORE_GETOPT_VERSION  ('v', "version"),
   ECORE_GETOPT_COPYRIGHT('c', "copyright"),
   ECORE_GETOPT_LICENSE  ('l', "license"),
@@ -185,7 +186,7 @@ _new_project(void *data __UNUSED__)
 EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
-   Eina_Bool info_only = false, reopen = false;
+   Eina_Bool info_only = false, reopen = false, open_group = false;
Config *config;
Recent *r;
int pos;
@@ -201,6 +202,7 @@ elm_main(int argc, char **argv)
  ECORE_GETOPT_VALUE_LIST(data_dirs),
  ECORE_GETOPT_VALUE_LIST(widgets),
  ECORE_GETOPT_VALUE_BOOL(reopen),
+ ECORE_GETOPT_VALUE_BOOL(open_group),
  ECORE_GETOPT_VALUE_BOOL(info_only),
  ECORE_GETOPT_VALUE_BOOL(info_only),
  ECORE_GETOPT_VALUE_BOOL(info_only),
@@ -359,6 +361,7 @@ run:
  ecore_file_mkpath(export_edc);
  ap.path.export_edc = eina_stringshare_add(export_edc);
   }
+ap.open_group = open_group;
 evas_object_show(ap.win);
 elm_run();
 exit:
diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index dc89760..fcfb8a1 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -57,6 +57,7 @@ typedef struct
 static Project_Navigator project_navigator;
 static Layout_Popup layout_p;
 static Resource_Name_Validator *validator = NULL;
+static Eina_Bool first_group_open = EINA_FALSE;
 
 static char *
 _group_item_label_get(void *data,
@@ -196,6 +197,7 @@ _expanded_cb(void *data __UNUSED__,
Eina_List *folders = NULL, *groups = NULL;
Elm_Object_Item *glit = event_info;
Eina_Stringshare *prefix = elm_object_item_data_get(glit);
+   Elm_Object_Item *it;
 
if (glit == project_navigator.item_top)
  widget_tree_items_get(ap.project->RM.groups, "", &folders, &groups);
@@ -204,23 +206,33 @@ _expanded_cb(void *data __UNUSED__,
 
EINA_LIST_FREE(folders, prefix)
  {
-elm_genlist_item_append(project_navigator.genlist,
+it = elm_genlist_item_append(project_navigator.genlist,
 project_navigator.itc_folder,
 prefix,
 glit,
 ELM_GENLIST_ITEM_TREE,
 NULL,
 NULL);
+if (ap.open_group && !first_group_open)
+  elm_genlist_item_expanded_set(it, true);
  }
EINA_LIST_FREE(groups, group)
  {
-elm_genlist_item_append(project_navigator.genlist,
+it = elm_genlist_item_append(project_navigator.genlist,
 project_navigator.itc_group,
 group,
 glit,
 ELM_GENLIST_ITEM_NONE,
 NULL,
 NULL);
+if (ap.open_group && !first_group_open)
+  {
+ elm_genlist_i

Re: [E-devel] Edje multiseat support

2016-12-02 Thread The Rasterman
On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly  said:

lso... this is new:

i'm seeing e's pointers/cursors getting stuck. it's because mouse out events
now are missing. tyr mouse over the bottom resize bar on a window, then move
mouse cursor into the application window above it. cursor still has he resize
animation thing. it's because mouse,out signal's are missing. this is new in
the last day or 2. i'm suspecting it may have to do with the new multiseat
work... i'm digging...

> Hi folks,
> 
> now that multiseat is supported up to Evas, we’re working on Edje.
> 
> The idea is that a developer would be able to implement an UI that
> may be used by more than one single seat, properly handling focus,
> and providing different feedback for different seats action.
> 
> Let’s say, different colors on focus, different images when different
> seat pointers are over, etc.
> 
> I’ve done an initial implementation and wrote an example. It’s available
> on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> edje_multiseat example (C code + EDC).
> 
> To make this possible, a few main changes were done:
>   *  New signals were added, adding the seat as suffix. So “mouse,in” would
> be still be emitted, but also “mouse,in,seat1”, for example
>   * Real Parts now may be focused by multiple seats
>   * Some actions receive an optional seat parameter. For instance,
> FOCUS_SET may receive the seat name, or it will consider it's about the
> default seat.
>* Since Evas seat devices may have arbitrary names (at least using
> wayland backend you can name them as you want using udev rules), or set
> them on programmatic ways, Edje will have custom names for seats, following
> a well established pattern. So first announced seat will be named “seat1”,
> the second “seat2”... If an application supports three seats, on EDC you
> know what signals you should expect. It makes it possible to write general
> applications (in the sense of not knowing exactly seats beforehand). But
> let’s say it’s not the case. there is a specific product built in a way
> that they know exactly which seats are supported and configured their
> names, or want to check if this seat has pointer, keyboard, or whatever…
> for this cases, Edje also emits signals saying when devices were added (or
> removed) and their names. With these names you can use a new Edje function
> to fetch the Evas device named as “seat1”.
> 
> Please let me know about any suggestions or concerns.
> 
> I should make a pull request with this initial patchset soon
> 
> Thank you
> 
> -- 
> Bruno Dilly
> ProFUSION embedded systems
> http://profusion.mobi
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


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


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


Re: [E-devel] Edje multiseat support

2016-12-02 Thread The Rasterman
On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly  said:

actually i need to bring up something else...


please memory profile your work!

i'm seeing over 1mb of hash entries being used by

_evas_object_pointer_data_get()

(called from _efl_canvas_object_pointer_mode_by_device_set()).

this is huge! now i have to figure out what even is the point of this code, but
it is new...

how did i see this? just ran enlightenment under valgrind massif and uses
massive visualizer:

http://www.enlightenment.org/ss/e-584241d30671d3.72934687.png

> Hi folks,
> 
> now that multiseat is supported up to Evas, we’re working on Edje.
> 
> The idea is that a developer would be able to implement an UI that
> may be used by more than one single seat, properly handling focus,
> and providing different feedback for different seats action.
> 
> Let’s say, different colors on focus, different images when different
> seat pointers are over, etc.
> 
> I’ve done an initial implementation and wrote an example. It’s available
> on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> edje_multiseat example (C code + EDC).
> 
> To make this possible, a few main changes were done:
>   *  New signals were added, adding the seat as suffix. So “mouse,in” would
> be still be emitted, but also “mouse,in,seat1”, for example
>   * Real Parts now may be focused by multiple seats
>   * Some actions receive an optional seat parameter. For instance,
> FOCUS_SET may receive the seat name, or it will consider it's about the
> default seat.
>* Since Evas seat devices may have arbitrary names (at least using
> wayland backend you can name them as you want using udev rules), or set
> them on programmatic ways, Edje will have custom names for seats, following
> a well established pattern. So first announced seat will be named “seat1”,
> the second “seat2”... If an application supports three seats, on EDC you
> know what signals you should expect. It makes it possible to write general
> applications (in the sense of not knowing exactly seats beforehand). But
> let’s say it’s not the case. there is a specific product built in a way
> that they know exactly which seats are supported and configured their
> names, or want to check if this seat has pointer, keyboard, or whatever…
> for this cases, Edje also emits signals saying when devices were added (or
> removed) and their names. With these names you can use a new Edje function
> to fetch the Evas device named as “seat1”.
> 
> Please let me know about any suggestions or concerns.
> 
> I should make a pull request with this initial patchset soon
> 
> Thank you
> 
> -- 
> Bruno Dilly
> ProFUSION embedded systems
> http://profusion.mobi
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


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


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


[EGIT] [core/efl] master 01/01: evas render cache - clean up memory in all cases

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

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

commit f9789aa94cd6b0de27b8fec3ae57634b74979a0c
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Dec 3 12:43:11 2016 +0900

evas render cache - clean up memory in all cases

this cleans up memory for the rect del array in render cache and when
smart objects are deleted that hold render caches
---
 src/lib/evas/canvas/evas_object_smart.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_smart.c 
b/src/lib/evas/canvas/evas_object_smart.c
index 3715625..a917825 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -1258,6 +1258,12 @@ evas_object_smart_cleanup(Evas_Object *eo_obj)
 if (o->calc_entry.next)
   eina_clist_remove(&o->calc_entry);
 
+if (o->render_cache)
+  {
+ evas_render_object_render_cache_free(eo_obj, o->render_cache);
+ o->render_cache = NULL;
+  }
+
 while (o->contained)
   {
  Evas_Object_Protected_Data *contained =

-- 




Re: [E-devel] Edje multiseat support

2016-12-02 Thread The Rasterman
On Fri, 2 Dec 2016 14:54:20 -0200 Bruno Dilly  said:

> Hi folks,
> 
> now that multiseat is supported up to Evas, we’re working on Edje.
> 
> The idea is that a developer would be able to implement an UI that
> may be used by more than one single seat, properly handling focus,
> and providing different feedback for different seats action.
> 
> Let’s say, different colors on focus, different images when different
> seat pointers are over, etc.
> 
> I’ve done an initial implementation and wrote an example. It’s available
> on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> edje_multiseat example (C code + EDC).
> 
> To make this possible, a few main changes were done:
>   *  New signals were added, adding the seat as suffix. So “mouse,in” would
> be still be emitted, but also “mouse,in,seat1”, for example
>   * Real Parts now may be focused by multiple seats
>   * Some actions receive an optional seat parameter. For instance,
> FOCUS_SET may receive the seat name, or it will consider it's about the
> default seat.
>* Since Evas seat devices may have arbitrary names (at least using
> wayland backend you can name them as you want using udev rules), or set
> them on programmatic ways, Edje will have custom names for seats, following
> a well established pattern. So first announced seat will be named “seat1”,
> the second “seat2”... If an application supports three seats, on EDC you
> know what signals you should expect. It makes it possible to write general
> applications (in the sense of not knowing exactly seats beforehand). But
> let’s say it’s not the case. there is a specific product built in a way
> that they know exactly which seats are supported and configured their
> names, or want to check if this seat has pointer, keyboard, or whatever…
> for this cases, Edje also emits signals saying when devices were added (or
> removed) and their names. With these names you can use a new Edje function
> to fetch the Evas device named as “seat1”.
> 
> Please let me know about any suggestions or concerns.
> 
> I should make a pull request with this initial patchset soon

wait... so seats can be named... udev rules. so lets say i have seats:

bob
jane

i get signals like:

mouse,in,bob
mouse,out,jane

right?

so i ALSO get

mouse,in,seat1
mouse,out,seat2

? so i can write specific seat name handling signal stuff AND also have
generic? or... ?

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


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


Re: [E-devel] Elm_Code naming

2016-12-02 Thread The Rasterman
On Fri, 02 Dec 2016 19:58:35 + Andrew Williams  said:

> Hi, as we're shifting everything to Eo I realised that in elm_code the only
> object is Elm.Code_Widget. As the rest of elm is exposing widgets or
> layouts I thought perhaps a larger refactor is needed than just moving the
> various components to Eo.
> 
> How about this:
> 
> Elm.Code <- the main widget
> 
> Elm.Code.Core (or Backend?) <- what used to be Elm_Code - the logic between
> widgets and files
> Elm.Code.File and Elm.Code.Line are pretty obvious
> 
> Any thoughts? Alternative is to leave it as is and just port but somehow
> Elm.Code.Widget does not feel right.
> 
> Hopefully this could leave the unstable api at some point so I'd like to
> get this agreed :)

basically- can these interfaces ever be re-used somewhere else. line line
api/control or file api - should it be an extension to the efl_file
class/interface? should there be another that other objects can share?

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


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


Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread The Rasterman
On Sat, 03 Dec 2016 01:45:30 + Gustavo Sverzut Barbieri
 said:

> Well, I did force and it "worked". Not much test, like I've noticed some
> cases check for class using just the eo_id...

how can you force it? literally there's missing non-eoid code paths. eo will
mess up the pointer by mucking about with the bits in it... i'm amazed it
worked at all.. but i guarantee you it wont be correct either way.

> Em sex, 2 de dez de 2016 às 23:31, Carsten Haitzler 
> escreveu:
> 
> > On Fri, 2 Dec 2016 22:24:19 -0200 Gustavo Sverzut Barbieri <
> > barbi...@gmail.com>
> > said:
> >
> > > On Fri, Dec 2, 2016 at 10:14 PM, Cedric BAIL 
> > wrote:
> > > > On Fri, Dec 2, 2016 at 3:17 PM, Gustavo Sverzut Barbieri
> > > >  wrote:
> > > >> barbieri pushed a commit to branch master.
> > > >>
> > > >>
> > http://git.enlightenment.org/core/efl.git/commit/?id=227463bdde43bc9095b75f4ef19f9fef9a742f04
> > > >>
> > > >> commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
> > > >> Author: Gustavo Sverzut Barbieri 
> > > >> Date:   Fri Dec 2 20:48:37 2016 -0200
> > > >>
> > > >> eo: allow valgrind-like tracking of object lifecycle.
> > > >>
> > > >> Eo pointer indirection is super nice as it avoids you to access
> > > >> invalid memory, but this extra checks inhibits valgrind's own
> > tracking
> > > >> of memory lifecycle, usually it would report when the object was
> > > >> created and when the object is deleted, both as stack traces.
> > > >>
> > > >> This commits introduces logging of object creation and destruction
> > > >> under its own eina_log_domain and controlled by
> > EO_LIFECYCLE_DEBUG and
> > > >> EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
> > > >> compiled with EO_DEBUG, thus shouldn't cause any performance hits
> > on
> > > >> production code.
> > > >
> > > > I haven't looked at it, but wouldn't it be also possible to integrate
> > > > it with valgrind directly using valgrind macro ?
> > >
> > > I did not look either, I find it useful even without valgrind, but
> > > indeed when running inside valgrind it could be nice one.
> > >
> > > Maybe it's possible, I need to check the valgrind calls as they have
> > > no knowledge about the eo_id... and that's what we check, if disabling
> > > pointer indirection (undef HAVE_EO_ID), then valgrind will catch it
> > > even with eina_safety.
> >
> > you cant disable eoid anymore. we need too many bits for metadata now.
> >
> >
> > --
> > - Codito, ergo sum - "I code, therefore I am" --
> > The Rasterman (Carsten Haitzler)ras...@rasterman.com
> >
> >
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


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


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


[EGIT] [core/enlightenment] master 01/01: temp - udev pol - do in mainloop and suffer as appropriate

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

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

commit 1c8c57b7023095031ba917c35f445e8b06d6952f
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Dec 3 11:28:45 2016 +0900

temp - udev pol - do in mainloop and suffer as appropriate

if a poll takes a few hundred ms ... the so be it. udev is for
mainloop only. don't use it - that's my advice (for temp module).

:)
---
 src/modules/temperature/e_mod_main.c | 168 +--
 src/modules/temperature/e_mod_main.h |   3 +-
 2 files changed, 102 insertions(+), 69 deletions(-)

diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index c59d0e0..f1e2422 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -47,6 +47,81 @@ static int uuid = 0;
 
 static Config *temperature_config = NULL;
 
+static void
+_temperature_thread_free(Tempthread *tth)
+{
+   const char *s;
+
+   eina_stringshare_del(tth->sensor_name);
+   eina_stringshare_del(tth->sensor_path);
+#ifdef HAVE_EEZE
+   EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
+#endif
+   free(tth->extn);
+   free(tth);
+}
+
+static void
+_temperature_face_level_set(Config_Face *inst, double level)
+{
+   Edje_Message_Float msg;
+
+   if (level < 0.0) level = 0.0;
+   else if (level > 1.0) level = 1.0;
+   msg.val = level;
+   edje_object_message_send(inst->o_temp, EDJE_MESSAGE_FLOAT, 1, &msg);
+}
+
+static void
+_temperature_apply(Config_Face *inst, int temp)
+{
+   char buf[64];
+
+   if (temp != -999)
+ {
+if (inst->units == FAHRENHEIT) temp = (temp * 9.0 / 5.0) + 32;
+
+if (!inst->have_temp)
+  {
+ /* enable therm object */
+ edje_object_signal_emit(inst->o_temp, "e,state,known", "");
+ inst->have_temp = EINA_TRUE;
+  }
+if (inst->units == FAHRENHEIT)
+  snprintf(buf, sizeof(buf), "%i°F", temp);
+else
+  snprintf(buf, sizeof(buf), "%i°C", temp);
+
+_temperature_face_level_set(inst,
+(double)(temp - inst->low) /
+(double)(inst->high - inst->low));
+edje_object_part_text_set(inst->o_temp, "e.text.reading", buf);
+ }
+   else
+ {
+if (inst->have_temp)
+  {
+ /* disable therm object */
+ edje_object_signal_emit(inst->o_temp, "e,state,unknown", "");
+ edje_object_part_text_set(inst->o_temp, "e.text.reading", "N/A");
+ _temperature_face_level_set(inst, 0.5);
+ inst->have_temp = EINA_FALSE;
+  }
+ }
+}
+
+#ifdef HAVE_EEZE
+static Eina_Bool
+_temprature_udev_poll(void *data)
+{
+   Tempthread *tth = data;
+   int temp = temperature_udev_get(tth);
+
+   _temperature_apply(tth->inst, temp);
+   return EINA_TRUE;
+}
+#endif
+
 static E_Gadcon_Client *
 _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
 {
@@ -201,17 +276,6 @@ _temperature_face_cb_mouse_down(void *data, Evas *e 
EINA_UNUSED, Evas_Object *ob
 }
 
 static void
-_temperature_face_level_set(Config_Face *inst, double level)
-{
-   Edje_Message_Float msg;
-
-   if (level < 0.0) level = 0.0;
-   else if (level > 1.0) level = 1.0;
-   msg.val = level;
-   edje_object_message_send(inst->o_temp, EDJE_MESSAGE_FLOAT, 1, &msg);
-}
-
-static void
 _temperature_face_cb_menu_configure(void *data, E_Menu *m EINA_UNUSED, 
E_Menu_Item *mi EINA_UNUSED)
 {
Config_Face *inst;
@@ -230,6 +294,13 @@ _temperature_face_shutdown(const Eina_Hash *hash 
EINA_UNUSED, const void *key EI
if (inst->th) ecore_thread_cancel(inst->th);
if (inst->sensor_name) eina_stringshare_del(inst->sensor_name);
if (inst->id) eina_stringshare_del(inst->id);
+#ifdef HAVE_EEZE
+   if (inst->poller)
+ {
+ecore_poller_del(inst->poller);
+_temperature_thread_free(inst->tth);
+ }
+#endif
E_FREE(inst);
return EINA_TRUE;
 }
@@ -257,13 +328,7 @@ _temprature_check_main(void *data, Ecore_Thread *th)
for (;;)
  {
 if (ecore_thread_check(th)) break;
-temp = -999;
-#ifdef HAVE_EEZE
-if (tth->udev) temp = temperature_udev_get(tth);
-else
-#endif
-  temp = temperature_tempget_get(tth);
-
+temp = temperature_tempget_get(tth);
 if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
 ptemp = temp;
 usleep((100.0 / 8.0) * (double)tth->poll_interval);
@@ -277,55 +342,15 @@ _temprature_check_notify(void *data, Ecore_Thread *th, 
void *msg)
Tempthread *tth  = data;
Config_Face *inst = tth->inst;
int temp = (int)((long)msg);
-   char buf[64];
 
if (th != inst->th) return;
-   if (temp != -999)
- {
-if (inst->units == FAHRENHEIT) temp = (temp * 9.0 / 5.0) + 32;
-
-if (!inst->have_temp)
-  {
- /* ena

Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread Gustavo Sverzut Barbieri
Well, I did force and it "worked". Not much test, like I've noticed some
cases check for class using just the eo_id...

Em sex, 2 de dez de 2016 às 23:31, Carsten Haitzler 
escreveu:

> On Fri, 2 Dec 2016 22:24:19 -0200 Gustavo Sverzut Barbieri <
> barbi...@gmail.com>
> said:
>
> > On Fri, Dec 2, 2016 at 10:14 PM, Cedric BAIL 
> wrote:
> > > On Fri, Dec 2, 2016 at 3:17 PM, Gustavo Sverzut Barbieri
> > >  wrote:
> > >> barbieri pushed a commit to branch master.
> > >>
> > >>
> http://git.enlightenment.org/core/efl.git/commit/?id=227463bdde43bc9095b75f4ef19f9fef9a742f04
> > >>
> > >> commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
> > >> Author: Gustavo Sverzut Barbieri 
> > >> Date:   Fri Dec 2 20:48:37 2016 -0200
> > >>
> > >> eo: allow valgrind-like tracking of object lifecycle.
> > >>
> > >> Eo pointer indirection is super nice as it avoids you to access
> > >> invalid memory, but this extra checks inhibits valgrind's own
> tracking
> > >> of memory lifecycle, usually it would report when the object was
> > >> created and when the object is deleted, both as stack traces.
> > >>
> > >> This commits introduces logging of object creation and destruction
> > >> under its own eina_log_domain and controlled by
> EO_LIFECYCLE_DEBUG and
> > >> EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
> > >> compiled with EO_DEBUG, thus shouldn't cause any performance hits
> on
> > >> production code.
> > >
> > > I haven't looked at it, but wouldn't it be also possible to integrate
> > > it with valgrind directly using valgrind macro ?
> >
> > I did not look either, I find it useful even without valgrind, but
> > indeed when running inside valgrind it could be nice one.
> >
> > Maybe it's possible, I need to check the valgrind calls as they have
> > no knowledge about the eo_id... and that's what we check, if disabling
> > pointer indirection (undef HAVE_EO_ID), then valgrind will catch it
> > even with eina_safety.
>
> you cant disable eoid anymore. we need too many bits for metadata now.
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread The Rasterman
On Fri, 2 Dec 2016 22:24:19 -0200 Gustavo Sverzut Barbieri 
said:

> On Fri, Dec 2, 2016 at 10:14 PM, Cedric BAIL  wrote:
> > On Fri, Dec 2, 2016 at 3:17 PM, Gustavo Sverzut Barbieri
> >  wrote:
> >> barbieri pushed a commit to branch master.
> >>
> >> http://git.enlightenment.org/core/efl.git/commit/?id=227463bdde43bc9095b75f4ef19f9fef9a742f04
> >>
> >> commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
> >> Author: Gustavo Sverzut Barbieri 
> >> Date:   Fri Dec 2 20:48:37 2016 -0200
> >>
> >> eo: allow valgrind-like tracking of object lifecycle.
> >>
> >> Eo pointer indirection is super nice as it avoids you to access
> >> invalid memory, but this extra checks inhibits valgrind's own tracking
> >> of memory lifecycle, usually it would report when the object was
> >> created and when the object is deleted, both as stack traces.
> >>
> >> This commits introduces logging of object creation and destruction
> >> under its own eina_log_domain and controlled by EO_LIFECYCLE_DEBUG and
> >> EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
> >> compiled with EO_DEBUG, thus shouldn't cause any performance hits on
> >> production code.
> >
> > I haven't looked at it, but wouldn't it be also possible to integrate
> > it with valgrind directly using valgrind macro ?
> 
> I did not look either, I find it useful even without valgrind, but
> indeed when running inside valgrind it could be nice one.
> 
> Maybe it's possible, I need to check the valgrind calls as they have
> no knowledge about the eo_id... and that's what we check, if disabling
> pointer indirection (undef HAVE_EO_ID), then valgrind will catch it
> even with eina_safety.

you cant disable eoid anymore. we need too many bits for metadata now.


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


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


[EGIT] [core/efl] master 01/01: elm_code: Add indentation for matching braces

2016-12-02 Thread Andy Williams
ajwillia-ms pushed a commit to branch master.

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

commit ad5bce5cbdd5a332c2568c75d5404c3e22613b4c
Author: Andy Williams 
Date:   Sat Dec 3 00:55:02 2016 +

elm_code: Add indentation for matching braces

Summary: when type closing brace, it find matching braces and then indent.

Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with braces.
3. Check that closing braces have correct indent.

Reviewers: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D
---
 src/lib/elementary/elm_code_indent.c| 40 +
 src/lib/elementary/elm_code_indent.h|  2 ++
 src/lib/elementary/elm_code_widget.c| 32 +--
 src/tests/elementary/elm_code_test_indent.c | 38 +++
 4 files changed, 110 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_code_indent.c 
b/src/lib/elementary/elm_code_indent.c
index 7b3d8b1..b1b13d3 100644
--- a/src/lib/elementary/elm_code_indent.c
+++ b/src/lib/elementary/elm_code_indent.c
@@ -70,3 +70,43 @@ elm_code_line_indent_get(const char *prevtext, unsigned int 
prevlength)
return buf;
 }
 
+EAPI char *
+elm_code_line_indent_matching_braces_get(Elm_Code_Line *line)
+{
+   Elm_Code_File *file;
+   int stack, row;
+   unsigned int length, count = 0;
+   const char *content;
+   char *buf, *ptr;
+
+   file = line->file;
+   stack = 0;
+   row = line->number - 1;
+   while (row > 0)
+ {
+line = elm_code_file_line_get(file, row);
+content = elm_code_line_text_get(line, &length);
+if (memchr(content, '{', length)) stack--;
+else if (memchr(content, '}', length)) stack++;
+
+if (stack < 0)
+  {
+ if (length == 0) return strdup("");
+ ptr = (char *)content;
+ while (count < length)
+   {
+  if (!_elm_code_text_char_is_whitespace(*ptr))
+break;
+
+  count++;
+  ptr++;
+   }
+ buf = malloc(sizeof(char) * (count + 1));
+ memset(buf, ' ', count);
+ buf[count] = '\0';
+ return buf;
+  }
+row--;
+ }
+   return strdup("");
+}
diff --git a/src/lib/elementary/elm_code_indent.h 
b/src/lib/elementary/elm_code_indent.h
index 2bbb5a1..1cf8891 100644
--- a/src/lib/elementary/elm_code_indent.h
+++ b/src/lib/elementary/elm_code_indent.h
@@ -22,6 +22,8 @@ extern "C" {
 
 EAPI char *elm_code_line_indent_get(const char *prevtext, unsigned int 
prevlength);
 
+EAPI char *elm_code_line_indent_matching_braces_get(Elm_Code_Line *line);
+
 /**
  * @}
  */
diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index cca8465..a05cf32 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -775,7 +775,7 @@ _popup_menu_show(Evas_Object *obj, Evas_Coord x, Evas_Coord 
y)
(pd->hoversel, "Copy", NULL, ELM_ICON_NONE,
 _popup_menu_copy_cb, obj);
 if (pd->editable)
-  {
+  {
  elm_hoversel_item_add
 (pd->hoversel, "Paste", NULL, ELM_ICON_NONE,
  _popup_menu_paste_cb, obj);
@@ -1217,7 +1217,8 @@ _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget 
*widget, const char *t
Elm_Code *code;
Elm_Code_Line *line;
Elm_Code_Widget_Change_Info *change;
-   unsigned int row, col, position, col_width;
+   unsigned int row, col, position, col_width, curlen, indent, count;
+   char *curtext, *leading;
 
_elm_code_widget_delete_selection(widget);
code = elm_obj_code_widget_code_get(widget);
@@ -1229,6 +1230,33 @@ 
_elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char *t
 row = elm_code_file_lines_get(code->file);
 line = elm_code_file_line_get(code->file, row);
  }
+   if (text[0] == '}')
+ {
+curtext = (char *)elm_code_line_text_get(line, &curlen);
+
+count = 0;
+while (count < curlen)
+  {
+ if (!_elm_code_text_char_is_whitespace(*curtext))
+ break;
+
+ count++;
+ curtext++;
+  }
+
+if (count + 1 == col)
+  {
+ leading = elm_code_line_indent_matching_braces_get(line);
+ elm_code_line_text_leading_whitespace_strip(line);
+ elm_code_line_text_insert(line, 0, leading, strlen(leading));
+
+ indent = elm_obj_code_widget_line_text_column_width_to_position(
+widget, line, strlen(leading));
+ elm_obj_code_widget_cursor_position_set(widget, indent, row);
+ elm_obj_code_widget_cursor_position_get(widget, &col, &row);
+ free(leading);
+  }
+ }
 
   

Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread Gustavo Sverzut Barbieri
On Fri, Dec 2, 2016 at 10:14 PM, Cedric BAIL  wrote:
> On Fri, Dec 2, 2016 at 3:17 PM, Gustavo Sverzut Barbieri
>  wrote:
>> barbieri pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=227463bdde43bc9095b75f4ef19f9fef9a742f04
>>
>> commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
>> Author: Gustavo Sverzut Barbieri 
>> Date:   Fri Dec 2 20:48:37 2016 -0200
>>
>> eo: allow valgrind-like tracking of object lifecycle.
>>
>> Eo pointer indirection is super nice as it avoids you to access
>> invalid memory, but this extra checks inhibits valgrind's own tracking
>> of memory lifecycle, usually it would report when the object was
>> created and when the object is deleted, both as stack traces.
>>
>> This commits introduces logging of object creation and destruction
>> under its own eina_log_domain and controlled by EO_LIFECYCLE_DEBUG and
>> EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
>> compiled with EO_DEBUG, thus shouldn't cause any performance hits on
>> production code.
>
> I haven't looked at it, but wouldn't it be also possible to integrate
> it with valgrind directly using valgrind macro ?

I did not look either, I find it useful even without valgrind, but
indeed when running inside valgrind it could be nice one.

Maybe it's possible, I need to check the valgrind calls as they have
no knowledge about the eo_id... and that's what we check, if disabling
pointer indirection (undef HAVE_EO_ID), then valgrind will catch it
even with eina_safety.


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

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


Re: [E-devel] [EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread Cedric BAIL
On Fri, Dec 2, 2016 at 3:17 PM, Gustavo Sverzut Barbieri
 wrote:
> barbieri pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=227463bdde43bc9095b75f4ef19f9fef9a742f04
>
> commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
> Author: Gustavo Sverzut Barbieri 
> Date:   Fri Dec 2 20:48:37 2016 -0200
>
> eo: allow valgrind-like tracking of object lifecycle.
>
> Eo pointer indirection is super nice as it avoids you to access
> invalid memory, but this extra checks inhibits valgrind's own tracking
> of memory lifecycle, usually it would report when the object was
> created and when the object is deleted, both as stack traces.
>
> This commits introduces logging of object creation and destruction
> under its own eina_log_domain and controlled by EO_LIFECYCLE_DEBUG and
> EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
> compiled with EO_DEBUG, thus shouldn't cause any performance hits on
> production code.

I haven't looked at it, but wouldn't it be also possible to integrate
it with valgrind directly using valgrind macro ?
-- 
Cedric BAIL

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


Re: [E-devel] Edje multiseat support

2016-12-02 Thread Gustavo Sverzut Barbieri
On Fri, Dec 2, 2016 at 8:19 PM, Cedric BAIL  wrote:
> Hi,
>
> On Fri, Dec 2, 2016 at 8:54 AM, Bruno Dilly  wrote:
>> now that multiseat is supported up to Evas, we’re working on Edje.
>
> Yeah \o/
>
>> The idea is that a developer would be able to implement an UI that
>> may be used by more than one single seat, properly handling focus,
>> and providing different feedback for different seats action.
>>
>> Let’s say, different colors on focus, different images when different
>> seat pointers are over, etc.
>>
>> I’ve done an initial implementation and wrote an example. It’s available
>> on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
>> edje_multiseat example (C code + EDC).
>>
>> To make this possible, a few main changes were done:
>>   *  New signals were added, adding the seat as suffix. So “mouse,in” would
>> be still be emitted, but also “mouse,in,seat1”, for example
>>   * Real Parts now may be focused by multiple seats
>>   * Some actions receive an optional seat parameter. For instance,
>> FOCUS_SET may receive the seat name, or it will consider it's about the
>> default seat.
>>* Since Evas seat devices may have arbitrary names (at least using
>> wayland backend you can name them as you want using udev rules), or set
>> them on programmatic ways, Edje will have custom names for seats, following
>> a well established pattern. So first announced seat will be named “seat1”,
>> the second “seat2”... If an application supports three seats, on EDC you
>> know what signals you should expect. It makes it possible to write general
>> applications (in the sense of not knowing exactly seats beforehand). But
>> let’s say it’s not the case. there is a specific product built in a way
>> that they know exactly which seats are supported and configured their
>> names, or want to check if this seat has pointer, keyboard, or whatever…
>> for this cases, Edje also emits signals saying when devices were added (or
>> removed) and their names. With these names you can use a new Edje function
>> to fetch the Evas device named as “seat1”.
>
> I think it would be better to actually emit both a "event,seat1" and a
> "event,seat_named". It will be easier to use from theme where named
> seat have been customized and won't cost much more I think.

we did think a lot about it and it doesn't make sense, actually for
*theme* the only plausible solution is the sequential numbers.

OTOH, some *app* may want to persist or associate the actual seat the
with something else, like some username,credentials for a game... then
we offer the api to see the actual device "seat1" is.

Believe, me for theme if you get "button,1,xpto" in ".edc" you cannot
figure out what is "xpto" or do anything about it, programs don't get
their trigger names, for example :-)


> Something that seems out of the proposal is text cursor. I think we
> want to be able to assign a seat per Edje_Cursor so that we have
> multiple people able to mess with an entry, but I know that Tom and
> Daniel have been working on redefining the API there. So I am not sure
> about what needs to be done in that context. Maybe they can share
> there thinking on the topic.

Indeed it's not in the scope and text editing is a big bitch on its own.

Tom and Daniel can now get the events and test. If they can't
understand or miss something, they can ping us.


> Another case, that I think we want to handle somehow is specific drag
> per seat. If you look at edje_callback.c, you will see that we need to
> handle seat in that context too. I would guess we want to set some
> kind of filter via both API and theme. Do you have an opinion on that
> bit already ?

drag per seat was planned, like drag parts... used in scrollers.


> Also if we are to do a theme in elementary that support multi seat, I
> would expect to be able to disable a widget for a specific seat in the
> C code. Wouldn't it make sense ? So in which case, wouldn't an API to
> disable listening for an entire seat make sense also on edje ? Or do
> you have an idea on how to implement that doesn't require this ?

It's doable as it's just early check & return... BUT I wonder how
someone would use it...



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

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


[EGIT] [core/efl] master 01/01: eo: more information when we cannot resolve method.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 6e8280a54056ee173f336b9d0c0a67b851abc57a
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 21:35:18 2016 -0200

eo: more information when we cannot resolve method.

_efl_object_api_op_id_get() will query a hash for the given pointer,
however if it wasn't populated, it will return "NOOP" and we're
hopeless while debugging on what happened.

Common case is to use the incorrect method, like:

obj = efl_add(CLS1, ...);
cls2_method(obj);

Since we did not create CLS2, it won't populate its methods on the
hash, thus the lookup will return NOOP.

With this change the function now gets the target object and function
name so reports an insightful message such as:

ERR:eo file.c:123 cls2_method() Unable to resolve op for api func 
0x7ff492ddea00 for obj=0x40007e8ee1df (CLS1)
---
 src/lib/eo/Eo.h |  5 +++--
 src/lib/eo/eo.c | 16 
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 8ad780b..0fc48d9 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -827,7 +827,7 @@ typedef struct _Efl_Object_Call_Cache
 // hits.
 #define EFL_FUNC_COMMON_OP_END(Obj, Name, DefRet) \
 __##Name##_op_create: \
-   ___cache.op = _efl_object_api_op_id_get(EFL_FUNC_COMMON_OP_FUNC(Name)); \
+   ___cache.op = _efl_object_op_api_id_get(EFL_FUNC_COMMON_OP_FUNC(Name), Obj, 
#Name, __FILE__, __LINE__); \
if (___cache.op == EFL_NOOP) return DefRet; \
___cache.generation = _efl_object_init_generation; \
goto __##Name##_op_create_done;
@@ -914,7 +914,8 @@ __##Name##_op_create: \
 #define EFL_OBJECT_OP_FUNC(_api, _private) { _EFL_OBJECT_OP_API_ENTRY(_api), 
(void*)_private }
 
 // returns the OP id corresponding to the given api_func
-EAPI Efl_Object_Op _efl_object_api_op_id_get(const void *api_func);
+EAPI Efl_Object_Op _efl_object_api_op_id_get(const void *api_func) 
EINA_DEPRECATED;
+EAPI Efl_Object_Op _efl_object_op_api_id_get(const void *api_func, const Eo 
*obj, const char *api_func_name, const char *file, int line) 
EINA_ARG_NONNULL(1, 2, 3, 4) EINA_WARN_UNUSED_RESULT;
 
 // gets the real function pointer and the object data
 EAPI Eina_Bool _efl_object_call_resolve(Eo *obj, const char *func_name, 
Efl_Object_Op_Call_Data *call, Efl_Object_Call_Cache *callcache, const char 
*file, int line);
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 6430df8..d57c31c 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -638,6 +638,7 @@ _efl_object_api_op_id_get_internal(const void *api_func)
return op;
 }
 
+/* LEGACY, should be removed before next release */
 EAPI Efl_Object_Op
 _efl_object_api_op_id_get(const void *api_func)
 {
@@ -651,6 +652,21 @@ _efl_object_api_op_id_get(const void *api_func)
return op;
 }
 
+EAPI Efl_Object_Op
+_efl_object_op_api_id_get(const void *api_func, const Eo *obj, const char 
*api_func_name, const char *file, int line)
+{
+   Efl_Object_Op op = _efl_object_api_op_id_get_internal(api_func);
+
+   if (op == EFL_NOOP)
+ {
+eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR,
+   file, api_func_name, line,
+   "Unable to resolve op for api func %p for obj=%p (%s)", 
api_func, obj, efl_class_name_get(obj));
+ }
+
+   return op;
+}
+
 /* klass is the klass we are working on. hierarchy_klass is the class whe 
should
  * use when validating. */
 static Eina_Bool

-- 




[EGIT] [core/efl] master 03/03: eo: allow valgrind-like tracking of object lifecycle.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 227463bdde43bc9095b75f4ef19f9fef9a742f04
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 20:48:37 2016 -0200

eo: allow valgrind-like tracking of object lifecycle.

Eo pointer indirection is super nice as it avoids you to access
invalid memory, but this extra checks inhibits valgrind's own tracking
of memory lifecycle, usually it would report when the object was
created and when the object is deleted, both as stack traces.

This commits introduces logging of object creation and destruction
under its own eina_log_domain and controlled by EO_LIFECYCLE_DEBUG and
EO_LIFECYCLE_NO_DEBUG envvars. These will only be available if
compiled with EO_DEBUG, thus shouldn't cause any performance hits on
production code.

Running a bogus app with invalid efl_class_name_get() and double
efl_del() will report as below:

```sh
$ export EO_LIFECYCLE_NO_DEBUG=Efl_Loop_Timer,Efl_Promise,Efl_Future
$ export EO_LIFECYCLE_DEBUG=1
$ export EINA_LOG_LEVELS=eo_lifecycle:4
$ /tmp/bogus_app
DBG:eo_lifecycle lib/eo/eo.c:2712 _eo_log_obj_init() will log all object 
allocation and free
DBG:eo_lifecycle lib/eo/eo.c:2788 _eo_log_obj_init() will NOT log class 
'Efl_Future'
DBG:eo_lifecycle lib/eo/eo.c:2788 _eo_log_obj_init() will NOT log class 
'Efl_Promise'
DBG:eo_lifecycle lib/eo/eo.c:2788 _eo_log_obj_init() will NOT log class 
'Efl_Loop_Timer'
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35a1aa0 
obj_id=0x42cf38ef class=0x563fa35a1450 (Efl_Vpath_Core) [0.0004]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35af8d0 
obj_id=0x46cf38f0 class=0x563fa35aecf0 (Efl_Loop) [0.0005]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35d61a0 
obj_id=0x40007ecf390e class=0x563fa35d48f0 (Efl_Net_Dialer_Simple) [0.0054]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35d6470 
obj_id=0x400082cf390f class=0x563fa35d0d60 (Efl_Net_Dialer_Tcp) [0.0055]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35d75b0 
obj_id=0x400086cf3910 class=0x563fa35d66b0 (Efl_Io_Queue) [0.0056]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35d8f70 
obj_id=0x40008acf3911 class=0x563fa35d7860 (Efl_Io_Copier) [0.0057]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35df980 
obj_id=0x4000a6cf3918 class=0x563fa35d66b0 (Efl_Io_Queue) [0.0058]
DBG:eo_lifecycle lib/eo/eo.c:2665 _eo_log_obj_new() new obj=0x563fa35dfc30 
obj_id=0x4000aacf3919 class=0x563fa35d7860 (Efl_Io_Copier) [0.0058]

will efl_class_name_get() with invalid handle:

ERR:eo lib/eo/eo.c:1013 efl_class_name_get() Class (0x2029) is 
an invalid ref.
ERR:eo_lifecycle lib/eo/eo.c:1013 efl_class_name_get() 
obj_id=0x2029 was neither created or deleted 
(EO_LIFECYCLE_NO_DEBUG='Efl_Loop_Timer,Efl_Promise,Efl_Future').
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35df980 obj_id=0x4000a6cf3918 class=0x563fa35d66b0 
(Efl_Io_Queue) [0.0061]
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35dfc30 obj_id=0x4000aacf3919 class=0x563fa35d7860 
(Efl_Io_Copier) [0.0061]
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35d75b0 obj_id=0x400086cf3910 class=0x563fa35d66b0 
(Efl_Io_Queue) [0.0061]
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35d8f70 obj_id=0x40008acf3911 class=0x563fa35d7860 
(Efl_Io_Copier) [0.0061]
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35d6470 obj_id=0x400082cf390f class=0x563fa35d0d60 
(Efl_Net_Dialer_Tcp) [0.0063]
DBG:eo_lifecycle lib/eo/eo.c:2688 _eo_log_obj_free() free 
obj=0x563fa35d61a0 obj_id=0x40007ecf390e class=0x563fa35d48f0 
(Efl_Net_Dialer_Simple) [0.0063]

will double free:

ERR:eo ../src/lib/eo/efl_object.eo.c:78 efl_del() EOID 0x40007ecf390e 
is not a valid object. EOID domain=0, current_domain=0, local_domain=0. EOID 
generation=2cf390e, id=1f, ref=1, super=0. Thread self=main. Available domains 
[0 1]. Maybe it has been deleted or does not belong to your thread?
ERR:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del() 
obj_id=0x40007ecf390e created obj=0x563fa35d61a0, class=0x563fa35d48f0 
(Efl_Net_Dialer_Simple) [0.0054s, 0.0009 ago]:
ERR:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x007f2c0bc6d0ea: libeo_dbg.so+0x90ea (in src/lib/eo/.libs/libeo_dbg.so 
0x7f2c0bc64000)
ERR:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_del()
0x007f2c0bc6ca62: _efl_add_internal_start+0x1c2 (in 
src/lib/eo/.libs/libeo_dbg.so 0x7f2c0bc64000)
ERR:eo_lifecycle ../src/lib/eo/efl_object.eo.c:78 efl_d

[EGIT] [core/efl] master 01/03: eo: improve logs by always showing event source, minor refactor.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit dfe3a4ad403c5d9219b3f383f8f8147907cff613
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 16:26:46 2016 -0200

eo: improve logs by always showing event source, minor refactor.

Instead of 2 sets of macro, one for HAVE_EO_ID and another without,
use a single set of macros and have the implementation of
_eo_class_pointer_get() and _eo_obj_pointer_get() to do the actual

These functions now take the source information so the logs reflect
that and not always the same function.
---
 src/lib/eo/eo.c |  55 ++--
 src/lib/eo/eo_private.h |  23 +++
 src/lib/eo/eo_ptr_indirection.c |  34 --
 src/lib/eo/eo_ptr_indirection.h | 140 +---
 src/lib/eo/eo_ptr_indirection.x |   1 +
 5 files changed, 139 insertions(+), 114 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index e86f052..ce28395 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -249,11 +249,28 @@ _eo_is_a_class(const Eo *eo_id)
 }
 
 static inline _Efl_Class *
-_eo_class_pointer_get(const Efl_Class *klass_id)
+_eo_class_pointer_get(const Efl_Class *klass_id, const char *func_name, const 
char *file, int line)
 {
 #ifdef HAVE_EO_ID
return ID_CLASS_GET((Eo_Id)klass_id);
+   (void)func_name;
+   (void)file;
+   (void)line;
 #else
+   Eo_Header *klass = (Eo_Header *)klass_id;
+   if (EINA_UNLIKELY(!klass))
+ {
+eina_log_print(_eo_log_dom,
+   EINA_LOG_LEVEL_DBG,
+   file, func_name, line,
+   "klass_id is NULL. Possibly unintended access?");
+return NULL;
+ }
+   if (EINA_UNLIKELY(!EINA_MAGIC_CHECK(klass, EO_CLASS_EINA_MAGIC)))
+ {
+eina_magic_fail(klass, klass->__magic, EO_CLASS_EINA_MAGIC, file, 
func_name, line);
+return NULL;
+ }
return (_Efl_Class *) klass_id;
 #endif
 }
@@ -369,7 +386,7 @@ _efl_object_call_resolve(Eo *eo_id, const char *func_name, 
Efl_Object_Op_Call_Da
 
if (is_obj)
  {
-EO_OBJ_POINTER_RETURN_VAL(eo_id, _obj, EINA_FALSE);
+EO_OBJ_POINTER_RETURN_VAL_PROXY(eo_id, _obj, EINA_FALSE);
 
 obj = _obj;
 klass = _obj->klass;
@@ -479,7 +496,7 @@ end:
 Eo *emb_obj_id;
 EINA_LIST_FOREACH(obj->composite_objects, itr, emb_obj_id)
   {
- EO_OBJ_POINTER(emb_obj_id, emb_obj);
+ EO_OBJ_POINTER_PROXY(emb_obj_id, emb_obj);
  if (EINA_UNLIKELY(!emb_obj)) continue;
 
  func = _vtable_func_get(emb_obj->vtable, cache->op);
@@ -543,7 +560,7 @@ ok_cur_klass:
 
 ok_klass:
  {
-EO_CLASS_POINTER_GOTO(eo_id, _klass, err_klass);
+EO_CLASS_POINTER_GOTO_PROXY(eo_id, _klass, err_klass);
 klass = _klass;
 vtable = &klass->vtable;
 call->obj = NULL;
@@ -728,16 +745,17 @@ err_klass:
 EAPI Eo *
 _efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, 
Eo *parent_id, Eina_Bool ref EINA_UNUSED, Eina_Bool is_fallback)
 {
+   const char *func_name = __FUNCTION__;
_Eo_Object *obj;
Eo_Stack_Frame *fptr = NULL;
 
if (is_fallback) fptr = _efl_add_fallback_stack_push(NULL);
 
-   EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass);
+   EO_CLASS_POINTER_GOTO_PROXY(klass_id, klass, err_klass);
 
if (parent_id)
  {
-EO_OBJ_POINTER_GOTO(parent_id, parent, err_parent);
+EO_OBJ_POINTER_GOTO_PROXY(parent_id, parent, err_parent);
  }
 
// not likely so use goto to alleviate l1 instruction cache of rare code
@@ -787,7 +805,7 @@ ok_nomatch_back:
 
 ok_nomatch:
  {
-EO_OBJ_POINTER_GOTO(eo_id, new_obj, err_newid);
+EO_OBJ_POINTER_GOTO_PROXY(eo_id, new_obj, err_newid);
 /* We have two refs at this point. */
 _efl_unref(obj);
 efl_del((Eo *)obj->header.id);
@@ -1171,18 +1189,17 @@ efl_class_new(const Efl_Class_Description *desc, const 
Efl_Class *parent_id, ...
va_list p_list;
size_t extn_sz, mro_sz, mixins_sz;
Eina_List *extn_list, *mro, *mixins;
+   _Efl_Class *parent = NULL;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(desc, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(desc->name, NULL);
 
-   _Efl_Class *parent = _eo_class_pointer_get(parent_id);
-#ifndef HAVE_EO_ID
-   if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC))
+   if (parent_id)
  {
-EINA_MAGIC_FAIL((Eo_Header *) parent, EO_CLASS_EINA_MAGIC);
-return NULL;
+parent = _eo_class_pointer_get(parent_id, __FUNCTION__, __FILE__, 
__LINE__);
+if (!parent)
+  return NULL;
  }
-#endif
 
/* Check restrictions on Interface types. */
if (desc->type == EFL_CLASS_TYPE_INTERFACE)
@@ -1231,7 +1248,7 @@ efl_class_new(const Efl_Class_Description *desc, const 
Efl_Class *parent_id, ...
 extn_id = va_arg(p_list, Eo_Id *)

[EGIT] [core/efl] master 02/03: eo: check for empty vtable and failed extensions.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit fc48161910fc013674f4af9e19ffafd449db2cfd
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 16:30:11 2016 -0200

eo: check for empty vtable and failed extensions.

if for some reason we fail to validate a class, then we should skip
that extension. This may result in an empty vtable, then check for
that and avoid a crash.

This is very unlike to happen in practice, but I've forced some
validation errors and could get to that.
---
 src/lib/eo/eo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index ce28395..71ef715 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1249,6 +1249,8 @@ efl_class_new(const Efl_Class_Description *desc, const 
Efl_Class *parent_id, ...
 while (extn_id)
   {
  extn = _eo_class_pointer_get((Efl_Class *)extn_id, __FUNCTION__, 
__FILE__, __LINE__);
+ if (!extn) /* did not validate */
+   continue;
  switch (extn->desc->type)
{
 case EFL_CLASS_TYPE_REGULAR_NO_INSTANT:
@@ -1412,6 +1414,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;
 

-- 




Re: [E-devel] Edje multiseat support

2016-12-02 Thread Cedric BAIL
Hi,

On Fri, Dec 2, 2016 at 8:54 AM, Bruno Dilly  wrote:
> now that multiseat is supported up to Evas, we’re working on Edje.

Yeah \o/

> The idea is that a developer would be able to implement an UI that
> may be used by more than one single seat, properly handling focus,
> and providing different feedback for different seats action.
>
> Let’s say, different colors on focus, different images when different
> seat pointers are over, etc.
>
> I’ve done an initial implementation and wrote an example. It’s available
> on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
> edje_multiseat example (C code + EDC).
>
> To make this possible, a few main changes were done:
>   *  New signals were added, adding the seat as suffix. So “mouse,in” would
> be still be emitted, but also “mouse,in,seat1”, for example
>   * Real Parts now may be focused by multiple seats
>   * Some actions receive an optional seat parameter. For instance,
> FOCUS_SET may receive the seat name, or it will consider it's about the
> default seat.
>* Since Evas seat devices may have arbitrary names (at least using
> wayland backend you can name them as you want using udev rules), or set
> them on programmatic ways, Edje will have custom names for seats, following
> a well established pattern. So first announced seat will be named “seat1”,
> the second “seat2”... If an application supports three seats, on EDC you
> know what signals you should expect. It makes it possible to write general
> applications (in the sense of not knowing exactly seats beforehand). But
> let’s say it’s not the case. there is a specific product built in a way
> that they know exactly which seats are supported and configured their
> names, or want to check if this seat has pointer, keyboard, or whatever…
> for this cases, Edje also emits signals saying when devices were added (or
> removed) and their names. With these names you can use a new Edje function
> to fetch the Evas device named as “seat1”.

I think it would be better to actually emit both a "event,seat1" and a
"event,seat_named". It will be easier to use from theme where named
seat have been customized and won't cost much more I think.

Something that seems out of the proposal is text cursor. I think we
want to be able to assign a seat per Edje_Cursor so that we have
multiple people able to mess with an entry, but I know that Tom and
Daniel have been working on redefining the API there. So I am not sure
about what needs to be done in that context. Maybe they can share
there thinking on the topic.

Another case, that I think we want to handle somehow is specific drag
per seat. If you look at edje_callback.c, you will see that we need to
handle seat in that context too. I would guess we want to set some
kind of filter via both API and theme. Do you have an opinion on that
bit already ?

Also if we are to do a theme in elementary that support multi seat, I
would expect to be able to disable a widget for a specific seat in the
C code. Wouldn't it make sense ? So in which case, wouldn't an API to
disable listening for an entire seat make sense also on edje ? Or do
you have an idea on how to implement that doesn't require this ?
-- 
Cedric BAIL

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


[EGIT] [editors/vim-configs] master 01/01: syntax/edc: add 'FOCUS_OBJECT' keyword

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=c79af96aecc0df76a572926554b594f854fa64bf

commit c79af96aecc0df76a572926554b594f854fa64bf
Author: Bruno Dilly 
Date:   Fri Dec 2 18:57:28 2016 -0200

syntax/edc: add 'FOCUS_OBJECT' keyword
---
 syntax/edc.vim | 1 +
 1 file changed, 1 insertion(+)

diff --git a/syntax/edc.vim b/syntax/edc.vim
index c822fb4..5b26ae3 100644
--- a/syntax/edc.vim
+++ b/syntax/edc.vim
@@ -68,6 +68,7 @@ syn keyword   edcConstant GLOW FAR_SHADOW FAR_SOFT_SHADOW
 syn keywordedcConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
 syn keywordedcConstant TOP_LEFT TOP TOP_RIGHT RIGHT
 syn keywordedcConstant STATE_SET ACTION_STOP SIGNAL_EMIT FOCUS_SET
+syn keywordedcConstant FOCUS_OBJECT
 syn keywordedcConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
 syn keywordedcConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE
 syn keywordedcConstant LIN DECEL DIVIS BOUNCE SPRING CURRENT

-- 




[EGIT] [website/www-content] master 01/01: Wiki page javascript_tutorial changed with summary [typos] by Lauro Moura

2016-12-02 Thread Lauro Moura
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=02f6bead83f0ed7598c717740f8f29f54ef4cd2c

commit 02f6bead83f0ed7598c717740f8f29f54ef4cd2c
Author: Lauro Moura 
Date:   Fri Dec 2 12:53:26 2016 -0800

Wiki page javascript_tutorial changed with summary [typos] by Lauro Moura
---
 pages/tutorial/javascript_tutorial.txt | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pages/tutorial/javascript_tutorial.txt 
b/pages/tutorial/javascript_tutorial.txt
index a6a857b..cd289b8 100644
--- a/pages/tutorial/javascript_tutorial.txt
+++ b/pages/tutorial/javascript_tutorial.txt
@@ -140,7 +140,7 @@ win.setText("Twitter App");
 win.setAutohide(true);
 
 
-Create and show two //box// widget containers, one to be the top level box and 
another to work like a list, with the individual tweets.
+Create and show two //boxes// widget containers, one to be the top level box 
and another to work like a list, with the individual tweets.
 
 
 box = new efl.Efl.Ui.Box(win);
@@ -166,9 +166,9 @@ tweet_box_orient = tweet_box.cast("Efl.Orientation");
 tweet_box_orient.setOrientation(efl.Efl.Orient.VERTICAL);
 
 
-Now we are ready to ask the twitter module to get the timeline of the target 
user. The 'get' function will be passed a callback that will be called when the 
data is ready. Inside it we will start building the tweet list.
+Now we are ready to ask the twitter module to get the timeline of the target 
user. The 'get' function will be passed a callback that will be called when the 
data is ready. Inside it, we will start building the tweet list.
 
-Also we create an array to store the icon widgets to be filled when the icon 
finish downloading.
+Also, we create an array to store the icon widgets to be filled when the icon 
finish downloading.
 
 
 icon_array = new Array(); // To store the icons
@@ -209,7 +209,7 @@ Once we have the theme loaded, we can use ''setText'' to 
set a new text to the r
 layout.setText("screen_name", " - @"+screen_name);
 
 
-To have a formatted text, we use an ''Elm.Entry'' to show the main tweet text 
and add this widget into theme using the ''setContent'' layout method. This 
allows us to inject full widgets into the layout, besides the basic stuff. Like 
''setText'', ''setContent'' also receives the name of the target part as the 
first argument.
+To have a formatted text, we use an ''Elm.Entry'' to show the main tweet text 
and add this widget into the theme using the ''setContent'' layout method. This 
allows us to inject full widgets into the layout, besides the basic stuff. Like 
''setText'', ''setContent'' also receives the name of the target part as the 
first argument.
 
 
 // continuing the previous for loop
@@ -244,7 +244,7 @@ Now, for the icon, we use an ''efl.Efl.Ui.Image''. It'll be 
set to display the d
 } // Finished the for loop
 
 
-To show the tweet image, we need to download it. We can accomplish this 
creating a new file stream with ''fs.createWriteStream'' and download the image 
to this file stream using the ''request'' module. Once the download is 
finished, we iterate through the list of icons widgets and tell them to display 
the dowloaded file. We also tell the tweetbox and the window to show themselves.
+To show the tweet image, we need to download it. We can accomplish this 
creating a new file stream with ''fs.createWriteStream'' and download the image 
to this file stream using the ''request'' module. Once the download is 
finished, we iterate through the list of icons widgets and tell them to display 
the downloaded file. We also tell the tweet box and the window to show 
themselves.
 
 
 
@@ -268,7 +268,7 @@ win.setSize(380, 400);
 win.setVisible(true);
 
 
-You will find these and more examples in directory ''src/examples'' in efl 
source code.
+You will find these and more examples in directory ''src/examples'' in the efl 
source code.
 
 All you need to run is:
 

-- 




Re: [E-devel] [EGIT] [core/enlightenment] master 02/02: e tempget module - mode to using threads instead of tempget binary

2016-12-02 Thread Mike Blumenkrantz
Feel free, just create an eeze_xyz prefix for your platform and start
hacking!

On Fri, Dec 2, 2016 at 1:42 PM Al Poole  wrote:

> On that side note, That's something I'm interested in doing.
>
>
> On Fri, Dec 2, 2016 at 5:20 PM, Mike Blumenkrantz <
> michael.blumenkra...@gmail.com> wrote:
>
> > Eeze is a device layer abstraction library; the eeze_udev API namespace
> is
> > so named because every function in its namespace interfaces directly with
> > udev.
> >
> > As a side note, the reason why eeze_udev is the only (and quite a low
> > level) API namespace is because nobody using other platforms has
> > contributed corresponding APIs for those platforms.
> >
> > On Fri, Dec 2, 2016 at 11:53 AM Carsten Haitzler 
> > wrote:
> >
> > > On Fri, 02 Dec 2016 14:23:23 + Mike Blumenkrantz
> > >  said:
> > >
> > > > It looks like this calls eeze (and thus udev) functions in a thread.
> > udev
> > > > is not threadsafe, and using eeze's global context in this way will
> > > result
> > > > in thread collisions.
> > >
> > > i thought all eeze was doing was opening /sys files and reading
> them...?
> > >
> > > > On Wed, Nov 30, 2016 at 6:50 PM Carsten Haitzler <
> ras...@rasterman.com
> > >
> > > > wrote:
> > > >
> > > > > raster pushed a commit to branch master.
> > > > >
> > > > >
> > > > >
> > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=
> > a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > > > >
> > > > > commit a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > > > > Author: Carsten Haitzler (Rasterman) 
> > > > > Date:   Wed Nov 30 17:06:45 2016 +0900
> > > > >
> > > > > e tempget module - mode to using threads instead of tempget
> > binary
> > > > >
> > > > > this should reduce mem usage by a sub binary and aso solve the
> > sub
> > > > > shell kill issue too nd still keep the polling of system status
> > > out of
> > > > > the mainloop and keep it unblocked.
> > > > > ---
> > > > >  src/modules/Makefile_temperature.mk |  11 +-
> > > > >  src/modules/temperature/e_mod_config.c  |  44 +++
> > > > >  src/modules/temperature/e_mod_main.c| 236 +---
> > > > >  src/modules/temperature/e_mod_main.h|  41 ++-
> > > > >  src/modules/temperature/e_mod_tempget.c | 604
> > > > > +++---
> > > > >  src/modules/temperature/e_mod_udev.c|  70 +---
> > > > >  src/modules/temperature/tempget.c   | 634
> > > > > 
> > > > >  7 files changed, 730 insertions(+), 910 deletions(-)
> > > > >
> > > > > diff --git a/src/modules/Makefile_temperature.mk
> > > b/src/modules/Makefile_
> > > > > temperature.mk
> > > > > index b583063..d1cb7fb 100644
> > > > > --- a/src/modules/Makefile_temperature.mk
> > > > > +++ b/src/modules/Makefile_temperature.mk
> > > > > @@ -22,14 +22,7 @@ if HAVE_EEZE
> > > > >  src_modules_temperature_module_la_SOURCES +=
> > > > > src/modules/temperature/e_mod_udev.c
> > > > >  endif
> > > > >
> > > > > -src_modules_temperature_tempgetdir = $(temperaturepkgdir)
> > > > > -src_modules_temperature_tempget_PROGRAMS =
> > > src/modules/temperature/tempget
> > > > > -
> > > > > -src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
> > > > > -src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
> > > > > -src_modules_temperature_tempget_SOURCES =
> > > > > src/modules/temperature/tempget.c
> > > > > -
> > > > >  PHONIES += temperature install-temperature
> > > > > -temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > > > $(src_modules_temperature_tempget_PROGRAMS)
> > > > > -install-temperature: install-temperatureDATA
> > > > > install-temperaturepkgLTLIBRARIES
> > > > > install-src_modules_temperature_tempgetPROGRAMS
> > > > > +temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > > > +install-temperature: install-temperatureDATA
> > > > > install-temperaturepkgLTLIBRARIES
> > > > >  endif
> > > > > diff --git a/src/modules/temperature/e_mod_config.c
> > > > > b/src/modules/temperature/e_mod_config.c
> > > > > index 57f5212..597184e 100644
> > > > > --- a/src/modules/temperature/e_mod_config.c
> > > > > +++ b/src/modules/temperature/e_mod_config.c
> > > > > @@ -37,6 +37,50 @@ static Evas_Object
> *_basic_create(E_Config_Dialog
> > > *cfd,
> > > > > Evas *evas, E_Config_Dia
> > > > >  static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data
> > > > > *cfdata);
> > > > >  static void _cb_display_changed(void *data, Evas_Object *obj
> > > EINA_UNUSED);
> > > > >
> > > > > +static Eina_List *
> > > > > +temperature_get_bus_files(const char *bus)
> > > > > +{
> > > > > +   Eina_List *result;
> > > > > +   Eina_List *therms;
> > > > > +   char path[PATH_MAX];
> > > > > +   char busdir[PATH_MAX];
> > > > > +   char *name;
> > > > > +
> > > > > +   result = NULL;
> > > > > +
> > > > > +   snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
> > > > > +   /* Look through all the devices for the given bus. */
> > > > > +   therms = ecore_file_ls(busdir);
> > > > > +

[E-devel] Elm_Code naming

2016-12-02 Thread Andrew Williams
Hi, as we're shifting everything to Eo I realised that in elm_code the only
object is Elm.Code_Widget. As the rest of elm is exposing widgets or
layouts I thought perhaps a larger refactor is needed than just moving the
various components to Eo.

How about this:

Elm.Code <- the main widget

Elm.Code.Core (or Backend?) <- what used to be Elm_Code - the logic between
widgets and files
Elm.Code.File and Elm.Code.Line are pretty obvious

Any thoughts? Alternative is to leave it as is and just port but somehow
Elm.Code.Widget does not feel right.

Hopefully this could leave the unstable api at some point so I'd like to
get this agreed :)

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


[EGIT] [core/efl] master 07/09: ecore-evas-wayland: Minor formatting fix

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit d33e0d34e0ff6f3ebac0ade1404028dafd50acb7
Author: Chris Michael 
Date:   Fri Dec 2 14:00:04 2016 -0500

ecore-evas-wayland: Minor formatting fix

NB: No functional changes, just formatting

Signed-off-by: Chris Michael 
---
 .../engines/wayland/ecore_evas_wayland_private.h   | 47 +++---
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git 
a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
index 77b2778..cb02409 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
@@ -1,34 +1,35 @@
 #ifndef _ECORE_EVAS_WAYLAND_PRIVATE_H_
-#define _ECORE_EVAS_WAYLAND_PRIVATE_H_
+# define _ECORE_EVAS_WAYLAND_PRIVATE_H_
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+# ifdef HAVE_CONFIG_H
+#  include "config.h"
+# endif
 
-#define ECORE_EVAS_INTERNAL
+# define ECORE_EVAS_INTERNAL
 
-#ifndef ELEMENTARY_H
+# ifndef ELEMENTARY_H
 //#define LOGFNS 1
-#ifdef LOGFNS
-# include 
-# define LOGFN(fl, ln, fn) \
+#  ifdef LOGFNS
+#   include 
+#   define LOGFN(fl, ln, fn) \
printf("-ECORE_EVAS-WL: %25s: %5i - %s\n", fl, ln, fn);
-#else
-# define LOGFN(fl, ln, fn)
-#endif
+#  else
+#   define LOGFN(fl, ln, fn)
+#  endif
 
-#include 
-#include 
-#include 
-#include 
-#include 
+#  include 
+#  include 
+#  include 
+#  include 
+#  include 
 
-#include 
-#endif
-#include "ecore_wl2_private.h"
-#include "ecore_private.h"
-#include "ecore_evas_private.h"
-#include "ecore_evas_wayland.h"
+#  include 
+# endif
+
+# include "ecore_wl2_private.h"
+# include "ecore_private.h"
+# include "ecore_evas_private.h"
+# include "ecore_evas_wayland.h"
 
 typedef struct _Ecore_Evas_Engine_Wl_Data Ecore_Evas_Engine_Wl_Data;
 

-- 




[EGIT] [core/efl] master 03/09: ecore-evas-wayland: Add a 'hidden' field to engine structure

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 725e43954528f88de4369f8d4515173c47d660b1
Author: Chris Michael 
Date:   Fri Dec 2 13:04:33 2016 -0500

ecore-evas-wayland: Add a 'hidden' field to engine structure

Signed-off-by: Chris Michael 
---
 src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h 
b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h
index 4307ebf..f2b4e51 100644
--- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h
+++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h
@@ -20,6 +20,7 @@ struct _Evas_Engine_Info_Wayland
 int depth, rotation, edges;
 int compositor_version;
 Eina_Bool destination_alpha : 1;
+Eina_Bool hidden : 1;
  } info;
 
/* non-blocking or blocking mode */

-- 




[EGIT] [core/efl] master 05/09: ecore-evas-wayland: Use engine 'hidden' field for ecore_evas_hide operations

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 0ecaf00d97323b7c02c2c9423b60c5f457bcbb54
Author: Chris Michael 
Date:   Fri Dec 2 13:26:50 2016 -0500

ecore-evas-wayland: Use engine 'hidden' field for ecore_evas_hide operations

This patch allows us to set a 'hidden' flag in the Evas Engine
information structure instead of setting a NULL surface. Setting this
flag allows us to hide/show a canvas without having to
destroy/recreate a wl_surface every time.

Signed-off-by: Chris Michael 
---
 .../engines/wayland/ecore_evas_wayland_common.c   | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index a4c2f36..e5e4937 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -1756,12 +1756,13 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
 
  surf = ecore_wl2_window_surface_get(wdata->win);
  if ((!einfo->info.wl_surface) || (einfo->info.wl_surface != surf))
-   {
-  einfo->info.wl_surface = surf;
-  if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info 
*)einfo))
-ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
-  evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h 
+ fh);
-   }
+   einfo->info.wl_surface = surf;
+
+ einfo->info.hidden = EINA_FALSE;
+ if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+   ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
+
  einfo->www_avail = !!wdata->win->www_surface;
  einfo->just_mapped = EINA_TRUE;
   }
@@ -1793,7 +1794,7 @@ _ecore_evas_wl_common_hide(Ecore_Evas *ee)
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
if (einfo)
  {
-einfo->info.wl_surface = NULL;
+einfo->info.hidden = EINA_TRUE;
 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
   {
  ERR("Failed to set Evas Engine Info for '%s'", ee->driver);

-- 




[EGIT] [core/efl] master 01/09: ecore-wl2: Don't destroy surfaces on window hide

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 4c140180d19f314cc3c6c610f9c7a0cd01e0e0a0
Author: Chris Michael 
Date:   Fri Dec 2 13:02:00 2016 -0500

ecore-wl2: Don't destroy surfaces on window hide

In order to hide a window (via wayland) we can actually assign a NULL
buffer to the surface, so there is no need to destroy the window's
wl_surface during a hide request.

Signed-off-by: Chris Michael 
---
 src/lib/ecore_wl2/ecore_wl2_window.c | 72 ++--
 1 file changed, 37 insertions(+), 35 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 2c19f05..47f3fc8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -338,24 +338,25 @@ surf_err:
 static void
 _ecore_wl2_window_surface_create(Ecore_Wl2_Window *window)
 {
-   if (window->surface) return;
-
EINA_SAFETY_ON_NULL_RETURN(window->display->wl.compositor);
 
-   window->surface =
- wl_compositor_create_surface(window->display->wl.compositor);
if (!window->surface)
  {
-ERR("Failed to create surface for window");
-return;
- }
+window->surface =
+  wl_compositor_create_surface(window->display->wl.compositor);
+if (!window->surface)
+  {
+ ERR("Failed to create surface for window");
+ return;
+  }
 
-   window->surface_id =
- wl_proxy_get_id((struct wl_proxy *)window->surface);
+window->surface_id =
+  wl_proxy_get_id((struct wl_proxy *)window->surface);
 
-   if (window->display->wl.session_recovery)
- zwp_e_session_recovery_add_listener(window->display->wl.session_recovery,
- &_session_listener, window);
+if (window->display->wl.session_recovery)
+  
zwp_e_session_recovery_add_listener(window->display->wl.session_recovery,
+  &_session_listener, window);
+ }
 }
 
 EAPI Ecore_Wl2_Window *
@@ -443,36 +444,14 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window)
 {
Ecore_Wl2_Subsurface *subsurf;
Eina_Inlist *tmp;
-   EINA_SAFETY_ON_NULL_RETURN(window);
-
-   if (window->xdg_surface) xdg_surface_destroy(window->xdg_surface);
-   window->xdg_surface = NULL;
-
-   if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
-   window->xdg_popup = NULL;
 
-   if (window->wl_shell_surface)
- wl_shell_surface_destroy(window->wl_shell_surface);
-   window->wl_shell_surface = NULL;
-
-   if (window->www_surface)
- www_surface_destroy(window->www_surface);
-   window->www_surface = NULL;
+   EINA_SAFETY_ON_NULL_RETURN(window);
 
EINA_INLIST_FOREACH_SAFE(window->subsurfs, tmp, subsurf)
  _ecore_wl2_subsurf_unmap(subsurf);
 
-   if (window->uuid && window->surface && window->display->wl.session_recovery)
- zwp_e_session_recovery_destroy_uuid(window->display->wl.session_recovery,
-   window->surface, window->uuid);
-
-   if (window->surface) wl_surface_destroy(window->surface);
-   window->surface = NULL;
-
window->configure_serial = 0;
window->configure_ack = NULL;
-
-   window->surface_id = -1;
 }
 
 EAPI void
@@ -493,7 +472,30 @@ ecore_wl2_window_free(Ecore_Wl2_Window *window)
EINA_INLIST_FOREACH_SAFE(window->subsurfs, tmp, subsurf)
  _ecore_wl2_subsurf_free(subsurf);
 
+   if (window->xdg_surface) xdg_surface_destroy(window->xdg_surface);
+   window->xdg_surface = NULL;
+
+   if (window->xdg_popup) xdg_popup_destroy(window->xdg_popup);
+   window->xdg_popup = NULL;
+
+   if (window->wl_shell_surface)
+ wl_shell_surface_destroy(window->wl_shell_surface);
+   window->wl_shell_surface = NULL;
+
+   if (window->www_surface)
+ www_surface_destroy(window->www_surface);
+   window->www_surface = NULL;
+
ecore_wl2_window_hide(window);
+
+   if (window->uuid && window->surface && window->display->wl.session_recovery)
+ zwp_e_session_recovery_destroy_uuid(window->display->wl.session_recovery,
+   window->surface, window->uuid);
+
+   if (window->surface) wl_surface_destroy(window->surface);
+   window->surface = NULL;
+   window->surface_id = -1;
+
eina_stringshare_replace(&window->uuid, NULL);
 
if (window->title) eina_stringshare_del(window->title);

-- 




[EGIT] [core/efl] master 02/09: elementary: Don't set pointer surface to NULL

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 3214dad7c53af4d406ce7c237a89ba0088304f37
Author: Chris Michael 
Date:   Fri Dec 2 13:03:20 2016 -0500

elementary: Don't set pointer surface to NULL

As we no longer destroy a window's wl_surface during hide requests, we
should not be setting pointer surface to NULL here.

Signed-off-by: Chris Michael 
---
 src/lib/elementary/efl_ui_win.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index da07122..7bbf379 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -956,7 +956,6 @@ _elm_win_mouse_out(Ecore_Evas *ee)
if ((sd->wl.win) && (sd->pointer.ee))
  {
 ecore_evas_hide(sd->pointer.ee);
-sd->pointer.surf = NULL;
 ecore_wl2_window_pointer_set(sd->wl.win, NULL,
  sd->pointer.hot_x, sd->pointer.hot_y);
  }
@@ -2272,7 +2271,6 @@ _efl_ui_win_hide(Eo *obj, Efl_Ui_Win_Data *sd)
if (sd->pointer.ee)
  {
 ecore_evas_hide(sd->pointer.ee);
-sd->pointer.surf = NULL;
 ecore_wl2_window_pointer_set(sd->wl.win, NULL,
  sd->pointer.hot_x, sd->pointer.hot_y);
  }

-- 




[EGIT] [core/efl] master 08/09: ecore-evas-wayland: Remove unused includes

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit dc430179069e7a3c3cd67f6b271c38b3543db66e
Author: Chris Michael 
Date:   Fri Dec 2 14:00:23 2016 -0500

ecore-evas-wayland: Remove unused includes

As most of the "hard work" has been moved into
ecore_evas_wayland_common file, these includes are no longer needed
here.

Signed-off-by: Chris Michael 
---
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c | 2 --
 src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index f342252..0ecd868 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -4,8 +4,6 @@
 # include 
 # include 
 # include 
-# include 
-# include 
 
 #ifdef EAPI
 # undef EAPI
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index e538f99..b01d02b 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -4,8 +4,6 @@
 # include 
 # include 
 # include 
-# include 
-# include 
 
 #ifdef EAPI
 # undef EAPI

-- 




[EGIT] [core/efl] master 06/09: ecore-evas-wayland: Set all evas engine info fields before updating

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit f449fca9d65c514dc87b4d2b927fe7a3a8a9
Author: Chris Michael 
Date:   Fri Dec 2 13:58:09 2016 -0500

ecore-evas-wayland: Set all evas engine info fields before updating

Small patch to set all fields of the Evas Engine Info structure before
calling evas_engine_info_set function

Signed-off-by: Chris Michael 
---
 .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c   | 12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index e5e4937..81d16a4 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -1752,19 +1752,13 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
 if (einfo)
   {
- struct wl_surface *surf;
-
- surf = ecore_wl2_window_surface_get(wdata->win);
- if ((!einfo->info.wl_surface) || (einfo->info.wl_surface != surf))
-   einfo->info.wl_surface = surf;
-
+ einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win);
  einfo->info.hidden = EINA_FALSE;
+ einfo->www_avail = !!wdata->win->www_surface;
+ einfo->just_mapped = EINA_TRUE;
  if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
  evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
-
- einfo->www_avail = !!wdata->win->www_surface;
- einfo->just_mapped = EINA_TRUE;
   }
  }
 

-- 




[EGIT] [core/efl] master 04/09: evas-wayland-shm: Fix issue of destroying & recreating wl_surfaces on hide

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 9492ee21dfa642123043da5d5ef7954e886b0f9c
Author: Chris Michael 
Date:   Fri Dec 2 13:24:42 2016 -0500

evas-wayland-shm: Fix issue of destroying & recreating wl_surfaces on hide

When a canvas gets hidden, we don't need to destroy & recreate the
wl_surface. We can simply attach a NULL wl_buffer to the surface which
achieves the same result. This saves us from having to always destroy
& recreate surfaces when we hide/show.

Signed-off-by: Chris Michael 
---
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 17 -
 src/modules/evas/engines/wayland_shm/evas_engine.h |  4 +++-
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 10 --
 src/modules/evas/engines/wayland_shm/evas_shm.c| 16 +---
 4 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c 
b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 63d6e30..df04b5e 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -390,7 +390,7 @@ _fallback(Dmabuf_Surface *s, int w, int h)
new_data = surf->funcs.data_get(surf, NULL, NULL);
for (y = 0; y < h; y++)
  memcpy(new_data + y * w * 4, old_data + y * b->stride, w * 4);
-   surf->funcs.post(surf, NULL, 0);
+   surf->funcs.post(surf, NULL, 0, EINA_FALSE);
buffer_manager->unmap(b);
 
 out:
@@ -600,7 +600,7 @@ _evas_dmabuf_surface_assign(Surface *s)
 }
 
 static void
-_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int 
count)
+_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int 
count, Eina_Bool hidden)
 {
Dmabuf_Surface *surface;
Dmabuf_Buffer *b;
@@ -626,9 +626,16 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle 
*rects, unsigned int count)
 return;
  }
surface->pre = NULL;
-   wl_surface_attach(surface->wl_surface, b->wl_buffer, 0, 0);
-   _evas_surface_damage(surface->wl_surface, surface->compositor_version,
-b->w, b->h, rects, count);
+
+   if (!hidden)
+ {
+wl_surface_attach(surface->wl_surface, b->wl_buffer, 0, 0);
+_evas_surface_damage(surface->wl_surface, surface->compositor_version,
+ b->w, b->h, rects, count);
+ }
+   else
+ wl_surface_attach(surface->wl_surface, NULL, 0, 0);
+
wl_surface_commit(surface->wl_surface);
 }
 
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h 
b/src/modules/evas/engines/wayland_shm/evas_engine.h
index e3a0553..5bfb6c1 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -99,7 +99,7 @@ struct _Surface
 void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags);
 void *(*data_get)(Surface *surface, int *w, int *h);
 int  (*assign)(Surface *surface);
-void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int 
count);
+void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int 
count, Eina_Bool hidden);
  } funcs;
 };
 
@@ -133,6 +133,8 @@ struct _Outbuf
 /* Eina_Bool redraw : 1; */
 Eina_Bool destination_alpha : 1;
  } priv;
+
+   Eina_Bool hidden : 1;
 };
 
 Eina_Bool _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff);
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index b25242f..fcfb8b9 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -55,6 +55,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland 
*info)
ob->rotation = info->info.rotation;
ob->depth = info->info.depth;
ob->priv.destination_alpha = info->info.destination_alpha;
+   ob->hidden = info->info.hidden;
 
/* default to triple buffer */
ob->num_buff = 3;
@@ -82,7 +83,8 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland 
*info)
 sw = h;
 sh = w;
  }
-   else goto unhandled_rotation;
+   else
+ goto unhandled_rotation;
 
ob->surface = _evas_surface_create(info, sw, sh, ob->num_buff);
if (!ob->surface) goto surf_err;
@@ -203,6 +205,8 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage 
EINA_UNUSED, Tilebuf
 
LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+   if (ob->hidden) return;
+
if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) return;
 
if (ob->priv.rect_count) free(ob->priv.rects);
@@ -359,6 +363,8 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, 
Outbuf_Depth depth,
ob->depth = depth;
ob->priv.destination_alpha = alpha;
 
+   if (ob->hidden) return;
+
if ((ob->rotation == 0) || (ob->rotation == 180))
  {
 ob->surface->funcs.reconfigure

[EGIT] [core/efl] master 09/09: This series of patches merges in better support for hiding of surfaces

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 515d894fe9f0a6dda6515b50a33c7737e7e75ed1
Merge: 6f3f514 dc43017
Author: Chris Michael 
Date:   Fri Dec 2 14:25:23 2016 -0500

This series of patches merges in better support for hiding of surfaces

Essentially, this series modifies ecore_evas and evas engine code in
order that we do not need to destroy surfaces when hiding a canvas.
Previous code would destroy the wl_surface on ecore_evas_hide and have
to recreate it on ecore_evas_show. These patches eliminate the need to
do that by setting an engine field ('hidden'). When the evas engines
go to post a surface update, if it is 'hidden' then the code will just
attach a NULL buffer to the surface.

Merge branch 'devs/devilhorns/surface_hide'

 src/lib/ecore_wl2/ecore_wl2_window.c   | 72 +++---
 src/lib/elementary/efl_ui_win.c|  2 -
 .../engines/wayland/ecore_evas_wayland_common.c| 17 ++---
 .../engines/wayland/ecore_evas_wayland_egl.c   |  2 -
 .../engines/wayland/ecore_evas_wayland_private.h   | 47 +++---
 .../engines/wayland/ecore_evas_wayland_shm.c   |  2 -
 .../engines/wayland_common/Evas_Engine_Wayland.h   |  1 +
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 17 +++--
 src/modules/evas/engines/wayland_shm/evas_engine.h |  4 +-
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 10 ++-
 src/modules/evas/engines/wayland_shm/evas_shm.c| 16 ++---
 11 files changed, 100 insertions(+), 90 deletions(-)

-- 




[EGIT] [core/efl] master 01/01: edje_cc: add FOCUS_OBJECT reference on doc

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 6f3f514e4f31da2522fe7a23f1f228351a2ce8a3
Author: Bruno Dilly 
Date:   Fri Dec 2 16:41:01 2016 -0200

edje_cc: add FOCUS_OBJECT reference on doc

It was missing on actions list.
---
 src/bin/edje/edje_cc_handlers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index c5493c0..33aeb12 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -14092,6 +14092,7 @@ st_collections_group_programs_program_in(void)
 @li DRAG_VAL_STEP 1.0 0.0
 @li DRAG_VAL_PAGE 0.0 0.0
 @li FOCUS_SET
+@li FOCUS_OBJECT
 @li PARAM_COPY "src_part" "src_param" "dst_part" "dst_param"
 @li PARAM_SET "part" "param" "value"
 @li PLAY_SAMPLE "sample name" speed (channel)

-- 




Re: [E-devel] [EGIT] [core/enlightenment] master 02/02: e tempget module - mode to using threads instead of tempget binary

2016-12-02 Thread Al Poole
On that side note, That's something I'm interested in doing.


On Fri, Dec 2, 2016 at 5:20 PM, Mike Blumenkrantz <
michael.blumenkra...@gmail.com> wrote:

> Eeze is a device layer abstraction library; the eeze_udev API namespace is
> so named because every function in its namespace interfaces directly with
> udev.
>
> As a side note, the reason why eeze_udev is the only (and quite a low
> level) API namespace is because nobody using other platforms has
> contributed corresponding APIs for those platforms.
>
> On Fri, Dec 2, 2016 at 11:53 AM Carsten Haitzler 
> wrote:
>
> > On Fri, 02 Dec 2016 14:23:23 + Mike Blumenkrantz
> >  said:
> >
> > > It looks like this calls eeze (and thus udev) functions in a thread.
> udev
> > > is not threadsafe, and using eeze's global context in this way will
> > result
> > > in thread collisions.
> >
> > i thought all eeze was doing was opening /sys files and reading them...?
> >
> > > On Wed, Nov 30, 2016 at 6:50 PM Carsten Haitzler  >
> > > wrote:
> > >
> > > > raster pushed a commit to branch master.
> > > >
> > > >
> > > >
> > http://git.enlightenment.org/core/enlightenment.git/commit/?id=
> a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > > >
> > > > commit a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > > > Author: Carsten Haitzler (Rasterman) 
> > > > Date:   Wed Nov 30 17:06:45 2016 +0900
> > > >
> > > > e tempget module - mode to using threads instead of tempget
> binary
> > > >
> > > > this should reduce mem usage by a sub binary and aso solve the
> sub
> > > > shell kill issue too nd still keep the polling of system status
> > out of
> > > > the mainloop and keep it unblocked.
> > > > ---
> > > >  src/modules/Makefile_temperature.mk |  11 +-
> > > >  src/modules/temperature/e_mod_config.c  |  44 +++
> > > >  src/modules/temperature/e_mod_main.c| 236 +---
> > > >  src/modules/temperature/e_mod_main.h|  41 ++-
> > > >  src/modules/temperature/e_mod_tempget.c | 604
> > > > +++---
> > > >  src/modules/temperature/e_mod_udev.c|  70 +---
> > > >  src/modules/temperature/tempget.c   | 634
> > > > 
> > > >  7 files changed, 730 insertions(+), 910 deletions(-)
> > > >
> > > > diff --git a/src/modules/Makefile_temperature.mk
> > b/src/modules/Makefile_
> > > > temperature.mk
> > > > index b583063..d1cb7fb 100644
> > > > --- a/src/modules/Makefile_temperature.mk
> > > > +++ b/src/modules/Makefile_temperature.mk
> > > > @@ -22,14 +22,7 @@ if HAVE_EEZE
> > > >  src_modules_temperature_module_la_SOURCES +=
> > > > src/modules/temperature/e_mod_udev.c
> > > >  endif
> > > >
> > > > -src_modules_temperature_tempgetdir = $(temperaturepkgdir)
> > > > -src_modules_temperature_tempget_PROGRAMS =
> > src/modules/temperature/tempget
> > > > -
> > > > -src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
> > > > -src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
> > > > -src_modules_temperature_tempget_SOURCES =
> > > > src/modules/temperature/tempget.c
> > > > -
> > > >  PHONIES += temperature install-temperature
> > > > -temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > > $(src_modules_temperature_tempget_PROGRAMS)
> > > > -install-temperature: install-temperatureDATA
> > > > install-temperaturepkgLTLIBRARIES
> > > > install-src_modules_temperature_tempgetPROGRAMS
> > > > +temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > > +install-temperature: install-temperatureDATA
> > > > install-temperaturepkgLTLIBRARIES
> > > >  endif
> > > > diff --git a/src/modules/temperature/e_mod_config.c
> > > > b/src/modules/temperature/e_mod_config.c
> > > > index 57f5212..597184e 100644
> > > > --- a/src/modules/temperature/e_mod_config.c
> > > > +++ b/src/modules/temperature/e_mod_config.c
> > > > @@ -37,6 +37,50 @@ static Evas_Object *_basic_create(E_Config_Dialog
> > *cfd,
> > > > Evas *evas, E_Config_Dia
> > > >  static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data
> > > > *cfdata);
> > > >  static void _cb_display_changed(void *data, Evas_Object *obj
> > EINA_UNUSED);
> > > >
> > > > +static Eina_List *
> > > > +temperature_get_bus_files(const char *bus)
> > > > +{
> > > > +   Eina_List *result;
> > > > +   Eina_List *therms;
> > > > +   char path[PATH_MAX];
> > > > +   char busdir[PATH_MAX];
> > > > +   char *name;
> > > > +
> > > > +   result = NULL;
> > > > +
> > > > +   snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
> > > > +   /* Look through all the devices for the given bus. */
> > > > +   therms = ecore_file_ls(busdir);
> > > > +
> > > > +   EINA_LIST_FREE(therms, name)
> > > > + {
> > > > +Eina_List *files;
> > > > +char *file;
> > > > +
> > > > +/* Search each device for temp*_input, these should be
> > > > + * temperature devices. */
> > > > +snprintf(path, sizeof(path), "%s/%s", busdir, name);
> > > > +files = ecore_file_ls(path);
> > > > +EINA_LIST_FREE(file

[EGIT] [core/efl] master 01/01: eo: fix oops on efl_replace() documentation

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5d54c24a4e0e4a4a58c3dc9d1417acef588c0870
Author: Bruno Dilly 
Date:   Fri Dec 2 15:41:48 2016 -0200

eo: fix oops on efl_replace() documentation
---
 src/lib/eo/Eo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 244478b..cf74b5c 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -1339,7 +1339,7 @@ EAPI int efl_callbacks_cmp(const Efl_Callback_Array_Item 
*a, const Efl_Callback_
  * @param storage The object to replace the old reference. It can not be @c 
NULL.
  * @param new_obj The new object. It may be @c NULL.
  *
- * The string pointed by @c storage must be previously an Eo or
+ * The object pointed by @a storage must be previously an Eo or
  * @c NULL and it will be efl_unref(). The @a new_obj will be passed
  * to efl_ref() and then assigned to @c *storage.
  *

-- 




[EGIT] [core/efl] master 01/05: Efl.Input: Reset the Efl.Input object as soon as possible.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit 826cd7cb5e6e6a0a53dbe1c687de072dd8fd2f6c
Author: Guilherme Iscaro 
Date:   Thu Dec 1 16:12:37 2016 -0200

Efl.Input: Reset the Efl.Input object as soon as possible.

By doing this the pd->device reference is unrefed and deleted
if no one else is holding a reference to it.
---
 src/lib/evas/canvas/efl_input_focus.c   | 2 +-
 src/lib/evas/canvas/efl_input_key.c | 2 +-
 src/lib/evas/canvas/efl_input_pointer.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/efl_input_focus.c 
b/src/lib/evas/canvas/efl_input_focus.c
index 0bf4912..da2aba6 100644
--- a/src/lib/evas/canvas/efl_input_focus.c
+++ b/src/lib/evas/canvas/efl_input_focus.c
@@ -25,6 +25,7 @@ _del_hook(Eo *evt)
   }
 efl_reuse(evt);
 s_cached_event = evt;
+efl_input_reset(s_cached_event);
  }
else
  {
@@ -136,7 +137,6 @@ _efl_input_focus_efl_input_event_instance_get(Eo *klass 
EINA_UNUSED, void *_pd E
  {
 evt = s_cached_event;
 s_cached_event = NULL;
-efl_input_reset(evt);
 efl_parent_set(evt, owner);
  }
else
diff --git a/src/lib/evas/canvas/efl_input_key.c 
b/src/lib/evas/canvas/efl_input_key.c
index 685b6b3..869b559 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -25,6 +25,7 @@ _del_hook(Eo *evt)
   }
 efl_reuse(evt);
 s_cached_event = evt;
+efl_input_reset(s_cached_event);
  }
else
  {
@@ -44,7 +45,6 @@ _efl_input_key_efl_input_event_instance_get(Eo *klass 
EINA_UNUSED, void *_pd EIN
  {
 evt = s_cached_event;
 s_cached_event = NULL;
-efl_input_reset(evt);
 efl_parent_set(evt, owner);
  }
else
diff --git a/src/lib/evas/canvas/efl_input_pointer.c 
b/src/lib/evas/canvas/efl_input_pointer.c
index 4ec9af0..109906e 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -36,6 +36,7 @@ _del_hook(Eo *evt)
   }
 efl_reuse(evt);
 s_cached_event = evt;
+efl_input_reset(s_cached_event);
  }
else
  {
@@ -55,7 +56,6 @@ _efl_input_pointer_efl_input_event_instance_get(Eo *klass 
EINA_UNUSED, void *_pd
  {
 evt = s_cached_event;
 s_cached_event = NULL;
-efl_input_reset(evt);
 efl_parent_set(evt, owner);
  }
else

-- 




[EGIT] [core/efl] master 04/05: Efl.Input.Device: Do not ref/unref devices children devices.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit e0af7384a2edf4d6ebb33bec88dc72c672b84150
Author: Guilherme Iscaro 
Date:   Thu Dec 1 16:14:11 2016 -0200

Efl.Input.Device: Do not ref/unref devices children devices.

When a mouse/keyboard is removed from its seat under the Wayland backend,
it was not immediately deleted from EFL, because its parent was keeping
a reference to it. Since the mouse/keyboard is no longer present in the 
system
there's no reason the keep them around. To prevent this delayed deletion do
not ref/unref them when the parent is set.
---
 src/lib/efl/interfaces/efl_input_device.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_input_device.c 
b/src/lib/efl/interfaces/efl_input_device.c
index bb59fc6..f20063f 100644
--- a/src/lib/efl/interfaces/efl_input_device.c
+++ b/src/lib/efl/interfaces/efl_input_device.c
@@ -28,7 +28,11 @@ _efl_input_device_efl_object_destructor(Eo *obj, 
Efl_Input_Device_Data *pd)
  {
 Efl_Input_Device_Data *child = efl_data_scope_get(eo_child, 
EFL_INPUT_DEVICE_CLASS);
 child->parent = NULL;
-efl_unref(eo_child);
+ }
+   if (pd->parent)
+ {
+Efl_Input_Device_Data *p = efl_data_scope_get(pd->parent, 
EFL_INPUT_DEVICE_CLASS);
+p->children = eina_list_remove(p->children, obj);
  }
efl_unref(pd->source);
 
@@ -128,14 +132,12 @@ _efl_input_device_parent_set(Eo *obj, 
Efl_Input_Device_Data *pd, Efl_Input_Devic
  {
 Efl_Input_Device_Data *p = efl_data_scope_get(pd->parent, 
EFL_INPUT_DEVICE_CLASS);
 p->children = eina_list_remove(p->children, obj);
-efl_unref(obj);
  }
pd->parent = parent;
if (parent)
  {
 Efl_Input_Device_Data *p = efl_data_scope_get(parent, 
EFL_INPUT_DEVICE_CLASS);
 p->children = eina_list_append(p->children, obj);
-efl_ref(obj);
  }
 }
 

-- 




[EGIT] [core/efl] master 03/05: Efl.Input: Properly unref the device if a new device is set.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit 345fec274730ff8b14f41009fba89767d17f38fa
Author: Guilherme Iscaro 
Date:   Thu Dec 1 16:13:11 2016 -0200

Efl.Input: Properly unref the device if a new device is set.

The old device must be unrefed, otherwise it will leak.
---
 src/lib/evas/canvas/efl_input_focus.c   | 2 +-
 src/lib/evas/canvas/efl_input_hold.c| 2 +-
 src/lib/evas/canvas/efl_input_key.c | 2 +-
 src/lib/evas/canvas/efl_input_pointer.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/efl_input_focus.c 
b/src/lib/evas/canvas/efl_input_focus.c
index da2aba6..b76a836 100644
--- a/src/lib/evas/canvas/efl_input_focus.c
+++ b/src/lib/evas/canvas/efl_input_focus.c
@@ -83,7 +83,7 @@ _efl_input_focus_efl_input_event_device_set(Eo *obj 
EINA_UNUSED,
 Efl_Input_Focus_Data *pd,
 Efl_Input_Device *device)
 {
-   pd->device = efl_ref(device);
+   efl_replace(&pd->device, device);
 }
 
 EOLIAN static Efl_Input_Device *
diff --git a/src/lib/evas/canvas/efl_input_hold.c 
b/src/lib/evas/canvas/efl_input_hold.c
index 774af38..ac3dfbf 100644
--- a/src/lib/evas/canvas/efl_input_hold.c
+++ b/src/lib/evas/canvas/efl_input_hold.c
@@ -26,7 +26,7 @@ _efl_input_hold_hold_get(Eo *obj EINA_UNUSED, 
Efl_Input_Hold_Data *pd)
 EOLIAN static void
 _efl_input_hold_efl_input_event_device_set(Eo *obj EINA_UNUSED, 
Efl_Input_Hold_Data *pd, Efl_Input_Device *dev)
 {
-   pd->device = efl_ref(dev);
+   efl_replace(&pd->device, dev);
 }
 
 EOLIAN static Efl_Input_Device *
diff --git a/src/lib/evas/canvas/efl_input_key.c 
b/src/lib/evas/canvas/efl_input_key.c
index 869b559..984d82c 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -230,7 +230,7 @@ _efl_input_key_efl_input_event_event_flags_get(Eo *obj 
EINA_UNUSED, Efl_Input_Ke
 EOLIAN static void
 _efl_input_key_efl_input_event_device_set(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd, Efl_Input_Device *dev)
 {
-   pd->device = efl_ref(dev);
+   efl_replace(&pd->device, dev);
 }
 
 EOLIAN static Efl_Input_Device *
diff --git a/src/lib/evas/canvas/efl_input_pointer.c 
b/src/lib/evas/canvas/efl_input_pointer.c
index 109906e..397beef 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -224,7 +224,7 @@ _efl_input_pointer_delta_get(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, in
 EOLIAN static void
 _efl_input_pointer_efl_input_event_device_set(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, Efl_Input_Device *dev)
 {
-   pd->device = efl_ref(dev);
+   efl_replace(&pd->device, dev);
 }
 
 EOLIAN static Efl_Input_Device *

-- 




[EGIT] [core/efl] master 05/05: Merge branch 'devs/iscaro/devices'

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 81a25bc83f1a18aeb84c9329f017a4a00282c99d
Merge: 04450c4 e0af738
Author: Bruno Dilly 
Date:   Fri Dec 2 15:27:05 2016 -0200

Merge branch 'devs/iscaro/devices'

Series of fixes regarding Efl.Input.Device references.
There were some issues on Evas and on its own interface.

Also adds efl_replace() to replace referenced objects
(using it for devices for now). It follows
eina_stringshare_replace() approach.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4445

 src/lib/efl/interfaces/efl_input_device.c |  8 +---
 src/lib/eo/Eo.h   | 22 ++
 src/lib/evas/canvas/efl_input_focus.c |  4 ++--
 src/lib/evas/canvas/efl_input_hold.c  |  2 +-
 src/lib/evas/canvas/efl_input_key.c   |  4 ++--
 src/lib/evas/canvas/efl_input_pointer.c   |  4 ++--
 6 files changed, 34 insertions(+), 10 deletions(-)

-- 




[EGIT] [core/efl] master 02/05: Eo: Add efl_replace() function.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit 81782414dfba9a8a69ea42a4dd5b01fc19170d88
Author: Guilherme Iscaro 
Date:   Fri Dec 2 11:16:33 2016 -0200

Eo: Add efl_replace() function.

This new function adds a new way to safely replace Eo pointer values.
---
 src/lib/eo/Eo.h | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 8c81544..244478b 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -1334,6 +1334,28 @@ EAPI int efl_callbacks_cmp(const Efl_Callback_Array_Item 
*a, const Efl_Callback_
  EFL_CALLBACK_PRIORITY_DEFAULT, data)
 
 /**
+ * @def Replace the previously Eo pointer with new content.
+ *
+ * @param storage The object to replace the old reference. It can not be @c 
NULL.
+ * @param new_obj The new object. It may be @c NULL.
+ *
+ * The string pointed by @c storage must be previously an Eo or
+ * @c NULL and it will be efl_unref(). The @a new_obj will be passed
+ * to efl_ref() and then assigned to @c *storage.
+ *
+ * @see efl_ref()
+ * @see efl_unref()
+ */
+static inline void
+efl_replace(Eo **storage, Eo *new_obj)
+{
+   if (!storage || *storage == new_obj) return;
+   efl_ref(new_obj);
+   efl_unref(*storage);
+   *storage = new_obj;
+}
+
+/**
  * @}
  */
 

-- 




[EGIT] [core/enlightenment] master 01/01: Pager Gadget: Don't recalculate the pager if the zone is NULL.

2016-12-02 Thread Stephen okra Houston
okra pushed a commit to branch master.

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

commit cf1d253c56b6427110810423f1ccab88d2c66189
Author: Stephen okra Houston 
Date:   Fri Dec 2 11:28:10 2016 -0600

Pager Gadget: Don't recalculate the pager if the zone is NULL.

This fixes https://phab.enlightenment.org/T4960
---
 src/modules/pager/gadget/pager.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/pager/gadget/pager.c b/src/modules/pager/gadget/pager.c
index c562f92..b270329 100644
--- a/src/modules/pager/gadget/pager.c
+++ b/src/modules/pager/gadget/pager.c
@@ -284,6 +284,7 @@ _pager_recalc(void *data)
int w, h, zw, zh, w2, h2;
 
p->recalc = NULL;
+   if (!p->zone) return;
zw = p->zone->w; zh = p->zone->h;
pd = eina_list_data_get(p->desks);
if (!pd) return;

-- 




Re: [E-devel] [EGIT] [core/enlightenment] master 02/02: e tempget module - mode to using threads instead of tempget binary

2016-12-02 Thread Mike Blumenkrantz
Eeze is a device layer abstraction library; the eeze_udev API namespace is
so named because every function in its namespace interfaces directly with
udev.

As a side note, the reason why eeze_udev is the only (and quite a low
level) API namespace is because nobody using other platforms has
contributed corresponding APIs for those platforms.

On Fri, Dec 2, 2016 at 11:53 AM Carsten Haitzler 
wrote:

> On Fri, 02 Dec 2016 14:23:23 + Mike Blumenkrantz
>  said:
>
> > It looks like this calls eeze (and thus udev) functions in a thread. udev
> > is not threadsafe, and using eeze's global context in this way will
> result
> > in thread collisions.
>
> i thought all eeze was doing was opening /sys files and reading them...?
>
> > On Wed, Nov 30, 2016 at 6:50 PM Carsten Haitzler 
> > wrote:
> >
> > > raster pushed a commit to branch master.
> > >
> > >
> > >
> http://git.enlightenment.org/core/enlightenment.git/commit/?id=a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > >
> > > commit a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > > Author: Carsten Haitzler (Rasterman) 
> > > Date:   Wed Nov 30 17:06:45 2016 +0900
> > >
> > > e tempget module - mode to using threads instead of tempget binary
> > >
> > > this should reduce mem usage by a sub binary and aso solve the sub
> > > shell kill issue too nd still keep the polling of system status
> out of
> > > the mainloop and keep it unblocked.
> > > ---
> > >  src/modules/Makefile_temperature.mk |  11 +-
> > >  src/modules/temperature/e_mod_config.c  |  44 +++
> > >  src/modules/temperature/e_mod_main.c| 236 +---
> > >  src/modules/temperature/e_mod_main.h|  41 ++-
> > >  src/modules/temperature/e_mod_tempget.c | 604
> > > +++---
> > >  src/modules/temperature/e_mod_udev.c|  70 +---
> > >  src/modules/temperature/tempget.c   | 634
> > > 
> > >  7 files changed, 730 insertions(+), 910 deletions(-)
> > >
> > > diff --git a/src/modules/Makefile_temperature.mk
> b/src/modules/Makefile_
> > > temperature.mk
> > > index b583063..d1cb7fb 100644
> > > --- a/src/modules/Makefile_temperature.mk
> > > +++ b/src/modules/Makefile_temperature.mk
> > > @@ -22,14 +22,7 @@ if HAVE_EEZE
> > >  src_modules_temperature_module_la_SOURCES +=
> > > src/modules/temperature/e_mod_udev.c
> > >  endif
> > >
> > > -src_modules_temperature_tempgetdir = $(temperaturepkgdir)
> > > -src_modules_temperature_tempget_PROGRAMS =
> src/modules/temperature/tempget
> > > -
> > > -src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
> > > -src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
> > > -src_modules_temperature_tempget_SOURCES =
> > > src/modules/temperature/tempget.c
> > > -
> > >  PHONIES += temperature install-temperature
> > > -temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > $(src_modules_temperature_tempget_PROGRAMS)
> > > -install-temperature: install-temperatureDATA
> > > install-temperaturepkgLTLIBRARIES
> > > install-src_modules_temperature_tempgetPROGRAMS
> > > +temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > > +install-temperature: install-temperatureDATA
> > > install-temperaturepkgLTLIBRARIES
> > >  endif
> > > diff --git a/src/modules/temperature/e_mod_config.c
> > > b/src/modules/temperature/e_mod_config.c
> > > index 57f5212..597184e 100644
> > > --- a/src/modules/temperature/e_mod_config.c
> > > +++ b/src/modules/temperature/e_mod_config.c
> > > @@ -37,6 +37,50 @@ static Evas_Object *_basic_create(E_Config_Dialog
> *cfd,
> > > Evas *evas, E_Config_Dia
> > >  static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data
> > > *cfdata);
> > >  static void _cb_display_changed(void *data, Evas_Object *obj
> EINA_UNUSED);
> > >
> > > +static Eina_List *
> > > +temperature_get_bus_files(const char *bus)
> > > +{
> > > +   Eina_List *result;
> > > +   Eina_List *therms;
> > > +   char path[PATH_MAX];
> > > +   char busdir[PATH_MAX];
> > > +   char *name;
> > > +
> > > +   result = NULL;
> > > +
> > > +   snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
> > > +   /* Look through all the devices for the given bus. */
> > > +   therms = ecore_file_ls(busdir);
> > > +
> > > +   EINA_LIST_FREE(therms, name)
> > > + {
> > > +Eina_List *files;
> > > +char *file;
> > > +
> > > +/* Search each device for temp*_input, these should be
> > > + * temperature devices. */
> > > +snprintf(path, sizeof(path), "%s/%s", busdir, name);
> > > +files = ecore_file_ls(path);
> > > +EINA_LIST_FREE(files, file)
> > > +  {
> > > + if ((!strncmp("temp", file, 4)) &&
> > > + (!strcmp("_input", &file[strlen(file) - 6])))
> > > +   {
> > > +  char *f;
> > > +
> > > +  snprintf(path, sizeof(path),
> > > +   "%s/%s/%s", busdir, name, file);
> > > +  f = strdup(path);
> > > + 

Re: [E-devel] Elm Main Menu

2016-12-02 Thread Andrew Williams
Thanks, the resizing has gone away.
The black border is sometimes present but other times the content is larger
than the window (a negative border?).

Appreciate all the fixing thanks.
On Fri, 2 Dec 2016 at 02:29, Jean-Philippe André  wrote:

> Hey Andy,
>
> On 30 November 2016 at 22:54, Andrew Williams 
> wrote:
>
> I still see I here. Just updated efl and edi. It's not on every keypress
> but just using the cursor keys particularly around beeline characters seems
> to trigger it :(
>
> No idea where to start...
>
>
> Yeah it's got to do with the changes to Main Menu. Now it's in the
> framespace (is it a good or bad idea? I can find arguments for both points
> of view).
> And the framespace handling in X was shaky at best, it should be a bit
> better now.
>
> So the constant resizing of EDI should be fixed now.
>
> But you'll still see issues when first opening EDI, including a massive
> black border on the top-left. I know. I don't know exactly how to solve it
> but it's on my TODO list.
>
> Best regards,
>
>
>
>
> Andy
>
> On Wed, 30 Nov 2016 at 02:20, Jean-Philippe André 
> wrote:
>
> On 30 November 2016 at 13:55, Jean-Philippe André 
> wrote:
>
> Hi Andy,
>
> On 30 November 2016 at 11:35, Andrew Williams 
> wrote:
>
> Hi,
>
> The mainmenu seems to work fine.
> But since updating my edi window seems to shrink vertically after certain
> key presses - any chance it's related?
>
>
> Omg indeed. For me it's every key press and even just giving focus to EDI.
>
>
> Not pointing fingers as I've pushed plenty in today but I didn't see it
> until I pulled from origin I don't think.
>
>
> You know it's got to be the frenchie's fault. And probably related to the
> main menu, too.
> I'll have a look at what's going on.
>
>
> And it's magically gone before I could dive deep into this issue.
> Please let me know if you still experience it.
>
>
>
> :)
>
>
>
> Andy
>
> On Tue, 29 Nov 2016 at 02:05, Jean-Philippe André 
> wrote:
>
> Hey Andy,
>
> I've reverted my revert and tried to fix my original patch.
> Let me know if it works fine for you!
>
> Thanks,
>
>
> On 29 November 2016 at 02:02, Andrew Williams 
> wrote:
>
> Great thanks, I love having my tab bar back :)
>
> Have a great day!
> Andy
>
> On Mon, 28 Nov 2016 at 00:57, Jean-Philippe André 
> wrote:
>
> Hi,
>
> On 28 November 2016 at 11:44, Carsten Haitzler 
> wrote:
>
> On Sun, 27 Nov 2016 15:58:42 + Andrew Williams 
> said:
>
> > Yup - that's what I see - right in elementary_test.
> >
> > Not started bisecting as I've not been coding for a few days. Might get a
> > chance today.
> > But of course the efl build time is quite an issue for this :-p
>
> it's very likely to do with jpeg's changes tot he elm win/efl ui win and
> theme
> and csd etc. 
>
>
> Yes, of course it was related. After playing a bit with the menu, trying
> to place it inside the framespace, I encountered many sizing issues
> (elm_menu and efl_ui_win both use custom layout functions). So I reverted
> some of my changes and the menu bar is back inside win.edc. For now.
> Hopefully I can fix the sizing issues as all the conformant features also
> need to move inside the window.
>
>
>
> > Andrew
> > On Sun, 27 Nov 2016 at 02:57, Carsten Haitzler 
> wrote:
> >
> > > On Sun, 27 Nov 2016 07:44:25 +0200 Daniel Zaoui <
> daniel.za...@samsung.com>
> > > said:
> > >
> > > > Hi Andrew,
> > > >
> > > > Do you see any issues in elementary_test? Cause seems ok there. Did
> you
> > > try
> > > > to bisect?
> > > >
> > > > Exactness doesn't cover main_menu. It should but the scenario has
> never
> > > been
> > > > recorded.
> > > >
> > > > JackDanielZ
> > >
> > > elm test does show the b0rk. resize the main menu test vertically.
> notice
> > > the
> > > label will slide underneath the main menu. this is the b0rk. :)
> > >
> > > > On Sat, 26 Nov 2016 15:20:13 +
> > > > Andrew Williams  wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > In the last week (or two) the elm main menu has stopped reserving
> its
> > > > > own space and has started overlapping content. Does anyone know why
> > > > > this might be?
> > > > > Have the UI tests stopped being run or did the exactness not cover
> > > > > mainmenu layout? (Again, not sure where to look)
> > > > >
> > > > > Thanks for any tips,
> > > > > Andy
> > > > >
> > >
> --
> > > > > ___
> > > > > enlightenment-devel mailing list
> > > > > enlightenment-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> --
> > > > ___
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > >
> > >
> > > --
> > > 

[E-devel] Edje multiseat support

2016-12-02 Thread Bruno Dilly
Hi folks,

now that multiseat is supported up to Evas, we’re working on Edje.

The idea is that a developer would be able to implement an UI that
may be used by more than one single seat, properly handling focus,
and providing different feedback for different seats action.

Let’s say, different colors on focus, different images when different
seat pointers are over, etc.

I’ve done an initial implementation and wrote an example. It’s available
on my branch devs/bdilly/edje_multiseat . There you’ll be able to find
edje_multiseat example (C code + EDC).

To make this possible, a few main changes were done:
  *  New signals were added, adding the seat as suffix. So “mouse,in” would
be still be emitted, but also “mouse,in,seat1”, for example
  * Real Parts now may be focused by multiple seats
  * Some actions receive an optional seat parameter. For instance,
FOCUS_SET may receive the seat name, or it will consider it's about the
default seat.
   * Since Evas seat devices may have arbitrary names (at least using
wayland backend you can name them as you want using udev rules), or set
them on programmatic ways, Edje will have custom names for seats, following
a well established pattern. So first announced seat will be named “seat1”,
the second “seat2”... If an application supports three seats, on EDC you
know what signals you should expect. It makes it possible to write general
applications (in the sense of not knowing exactly seats beforehand). But
let’s say it’s not the case. there is a specific product built in a way
that they know exactly which seats are supported and configured their
names, or want to check if this seat has pointer, keyboard, or whatever…
for this cases, Edje also emits signals saying when devices were added (or
removed) and their names. With these names you can use a new Edje function
to fetch the Evas device named as “seat1”.

Please let me know about any suggestions or concerns.

I should make a pull request with this initial patchset soon

Thank you

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


Re: [E-devel] [EGIT] [core/enlightenment] master 02/02: e tempget module - mode to using threads instead of tempget binary

2016-12-02 Thread The Rasterman
On Fri, 02 Dec 2016 14:23:23 + Mike Blumenkrantz
 said:

> It looks like this calls eeze (and thus udev) functions in a thread. udev
> is not threadsafe, and using eeze's global context in this way will result
> in thread collisions.

i thought all eeze was doing was opening /sys files and reading them...?

> On Wed, Nov 30, 2016 at 6:50 PM Carsten Haitzler 
> wrote:
> 
> > raster pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/enlightenment.git/commit/?id=a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> >
> > commit a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> > Author: Carsten Haitzler (Rasterman) 
> > Date:   Wed Nov 30 17:06:45 2016 +0900
> >
> > e tempget module - mode to using threads instead of tempget binary
> >
> > this should reduce mem usage by a sub binary and aso solve the sub
> > shell kill issue too nd still keep the polling of system status out of
> > the mainloop and keep it unblocked.
> > ---
> >  src/modules/Makefile_temperature.mk |  11 +-
> >  src/modules/temperature/e_mod_config.c  |  44 +++
> >  src/modules/temperature/e_mod_main.c| 236 +---
> >  src/modules/temperature/e_mod_main.h|  41 ++-
> >  src/modules/temperature/e_mod_tempget.c | 604
> > +++---
> >  src/modules/temperature/e_mod_udev.c|  70 +---
> >  src/modules/temperature/tempget.c   | 634
> > 
> >  7 files changed, 730 insertions(+), 910 deletions(-)
> >
> > diff --git a/src/modules/Makefile_temperature.mk b/src/modules/Makefile_
> > temperature.mk
> > index b583063..d1cb7fb 100644
> > --- a/src/modules/Makefile_temperature.mk
> > +++ b/src/modules/Makefile_temperature.mk
> > @@ -22,14 +22,7 @@ if HAVE_EEZE
> >  src_modules_temperature_module_la_SOURCES +=
> > src/modules/temperature/e_mod_udev.c
> >  endif
> >
> > -src_modules_temperature_tempgetdir = $(temperaturepkgdir)
> > -src_modules_temperature_tempget_PROGRAMS = src/modules/temperature/tempget
> > -
> > -src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
> > -src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
> > -src_modules_temperature_tempget_SOURCES =
> > src/modules/temperature/tempget.c
> > -
> >  PHONIES += temperature install-temperature
> > -temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > $(src_modules_temperature_tempget_PROGRAMS)
> > -install-temperature: install-temperatureDATA
> > install-temperaturepkgLTLIBRARIES
> > install-src_modules_temperature_tempgetPROGRAMS
> > +temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> > +install-temperature: install-temperatureDATA
> > install-temperaturepkgLTLIBRARIES
> >  endif
> > diff --git a/src/modules/temperature/e_mod_config.c
> > b/src/modules/temperature/e_mod_config.c
> > index 57f5212..597184e 100644
> > --- a/src/modules/temperature/e_mod_config.c
> > +++ b/src/modules/temperature/e_mod_config.c
> > @@ -37,6 +37,50 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd,
> > Evas *evas, E_Config_Dia
> >  static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data
> > *cfdata);
> >  static void _cb_display_changed(void *data, Evas_Object *obj EINA_UNUSED);
> >
> > +static Eina_List *
> > +temperature_get_bus_files(const char *bus)
> > +{
> > +   Eina_List *result;
> > +   Eina_List *therms;
> > +   char path[PATH_MAX];
> > +   char busdir[PATH_MAX];
> > +   char *name;
> > +
> > +   result = NULL;
> > +
> > +   snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
> > +   /* Look through all the devices for the given bus. */
> > +   therms = ecore_file_ls(busdir);
> > +
> > +   EINA_LIST_FREE(therms, name)
> > + {
> > +Eina_List *files;
> > +char *file;
> > +
> > +/* Search each device for temp*_input, these should be
> > + * temperature devices. */
> > +snprintf(path, sizeof(path), "%s/%s", busdir, name);
> > +files = ecore_file_ls(path);
> > +EINA_LIST_FREE(files, file)
> > +  {
> > + if ((!strncmp("temp", file, 4)) &&
> > + (!strcmp("_input", &file[strlen(file) - 6])))
> > +   {
> > +  char *f;
> > +
> > +  snprintf(path, sizeof(path),
> > +   "%s/%s/%s", busdir, name, file);
> > +  f = strdup(path);
> > +  if (f) result = eina_list_append(result, f);
> > +   }
> > + free(file);
> > +  }
> > +free(name);
> > + }
> > +   return result;
> > +}
> > +
> > +
> >  void
> >  config_temperature_module(Config_Face *inst)
> >  {
> > diff --git a/src/modules/temperature/e_mod_main.c
> > b/src/modules/temperature/e_mod_main.c
> > index 345b7e6..41e1c38 100644
> > --- a/src/modules/temperature/e_mod_main.c
> > +++ b/src/modules/temperature/e_mod_main.c
> > @@ -83,7 +83,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id,
> > const char *style)
> >
> > o = edje_object_add(gc->evas);
>

[EGIT] [core/efl] master 02/03: eo: better error reporting, always provide caller/source when available.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 216e6e51e4a49377d8867dfcaf0ca283c1dacfca
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 14:15:21 2016 -0200

eo: better error reporting, always provide caller/source when available.

_eo_pointer_error() was kinda a bitch to debug as it provided a nice
breakpoint location, but did not provide a good output since the file,
line and function were always the same.

Change that to be a thin wrapper on top of eina_log_vprint(), then we
keep the breakpoint location yet provide useful information.

In that sense, change other error messages so they carry as much
information as possible.
---
 src/lib/eo/eo.c | 18 +-
 src/lib/eo/eo_ptr_indirection.c |  8 ++--
 src/lib/eo/eo_ptr_indirection.h |  6 +++---
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 6d8c701..9719034 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -539,7 +539,7 @@ ok_klass:
goto ok_klass_back;
 
 err_klass:
-   _EO_POINTER_ERR("Class (%p) is an invalid ref.", eo_id);
+   _EO_POINTER_ERR("in %s:%d: func '%s': obj_id=%p is an invalid ref.", file, 
line, func_name, eo_id);
return EINA_FALSE;
 }
 
@@ -784,8 +784,8 @@ ok_nomatch:
goto ok_nomatch_back;
 
 err_noid:
-   ERR("Object of class '%s' - Error while constructing object",
-   klass->desc->name);
+   ERR("in %s:%d: Object of class '%s' - Error while constructing object",
+   file, line, klass->desc->name);
/* We have two refs at this point. */
_efl_unref(obj);
efl_del((Eo *) obj->header.id);
@@ -798,7 +798,7 @@ err_noreg:
return NULL;
 
 err_klass:
-   _EO_POINTER_ERR("Class (%p) is an invalid ref.", klass_id);
+   _EO_POINTER_ERR("in %s:%d: Class (%p) is an invalid ref.", file, line, 
klass_id);
 err_parent:
return NULL;
 }
@@ -2145,18 +2145,18 @@ efl_domain_data_adopt(Efl_Domain_Data *data_in)
 
if (!data_foreign)
  {
-ERR("Trying to adopt NULL domain data");
+ERR("Trying to adopt NULL domain data [data=%p in=%p]", data, data_in);
 return EFL_ID_DOMAIN_INVALID;
  }
if (data_foreign->local_domain == data->local_domain)
  {
-ERR("Trying to adopt EO ID domain %i, is the same as the local %i",
-data_foreign->local_domain, data->local_domain);
+ERR("Trying to adopt EO ID domain %i, is the same as the local %i 
[data=%p in=%p foreign=%p]",
+data_foreign->local_domain, data->local_domain, data, data_in, 
data_foreign);
 return EFL_ID_DOMAIN_INVALID;
  }
if (data->tables[data_foreign->local_domain])
  {
-ERR("Trying to adopt an already adopted domain");
+ERR("Trying to adopt an already adopted domain [data=%p in=%p 
foreign=%p]", data, data_in, data_foreign);
 return EFL_ID_DOMAIN_INVALID;
  }
data->tables[data_foreign->local_domain] =
@@ -2177,7 +2177,7 @@ efl_domain_data_return(Efl_Id_Domain domain)
  }
if (domain == data->local_domain)
  {
-ERR("Cannot return the local domain back to its owner");
+ERR("Cannot return the local domain %i back to its owner [data=%p]", 
domain, data);
 return EINA_FALSE;
  }
data->tables[domain] = NULL;
diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index 568b9f8..f8ccfe9 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -15,9 +15,13 @@ Eo_Id_Table_Data *_eo_table_data_shared_data = NULL;
 //
 
 void
-_eo_pointer_error(const char *msg)
+_eo_pointer_error(const char *func_name, const char *file, int line, const 
char *fmt, ...)
 {
-   ERR("%s", msg);
+   /* NOTE: this function exists to allow easy breakpoint on pointer errors */
+   va_list args;
+   va_start(args, fmt);
+   eina_log_vprint(_eo_log_dom, EINA_LOG_LEVEL_ERR, file, func_name, line, 
fmt, args);
+   va_end(args);
 }
 
 #ifdef HAVE_EO_ID
diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h
index 3df4fb5..b10a13e 100644
--- a/src/lib/eo/eo_ptr_indirection.h
+++ b/src/lib/eo/eo_ptr_indirection.h
@@ -8,10 +8,10 @@
 
 #ifdef HAVE_EO_ID
 
-void _eo_pointer_error(const char *msg);
+void _eo_pointer_error(const char *func_name, const char *file, int line, 
const char *fmt, ...);
 
-#define _EO_POINTER_ERR(fmt, ptr) \
-   do { char buf[256]; sprintf(buf, fmt, ptr); _eo_pointer_error(buf); } while 
(0)
+#define _EO_POINTER_ERR(fmt, ...) \
+  _eo_pointer_error(__FUNCTION__, __FILE__, __LINE__, fmt, __VA_ARGS__)
 
 #define EO_OBJ_POINTER(obj_id, obj) \
_Eo_Object *obj; \

-- 




[EGIT] [core/efl] master 01/03: eo: use log domain as soon as it's available.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit cf5aeb9804e030465f95f3eb0653a1b388983815
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 14:09:07 2016 -0200

eo: use log domain as soon as it's available.
---
 src/lib/eo/eo.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 48d0c29..6d8c701 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1923,19 +1923,19 @@ efl_object_init(void)
 
if (!eina_lock_recursive_new(&_efl_class_creation_lock))
  {
-EINA_LOG_ERR("Could not init lock.");
+ERR("Could not init lock.");
 return EINA_FALSE;
  }
 
if (!eina_spinlock_new(&_ops_storage_lock))
  {
-EINA_LOG_ERR("Could not init lock.");
+ERR("Could not init lock.");
 return EINA_FALSE;
  }
 
if (!eina_spinlock_new(&_super_class_lock))
  {
-EINA_LOG_ERR("Could not init lock.");
+ERR("Could not init lock.");
 return EINA_FALSE;
  }
 
@@ -1955,7 +1955,7 @@ efl_object_init(void)
_eo_table_data_shared = _eo_table_data_new(EFL_ID_DOMAIN_SHARED);
if (!_eo_table_data_shared)
  {
-EINA_LOG_ERR("Could not allocate shared table data");
+ERR("Could not allocate shared table data");
 return EINA_FALSE;
  }
_eo_table_data_shared_data = 
_eo_table_data_shared->tables[EFL_ID_DOMAIN_SHARED];
@@ -1965,12 +1965,12 @@ efl_object_init(void)
_eo_gdb_main_domain = data;
if (!data)
  {
-EINA_LOG_ERR("Could not allocate main table data");
+ERR("Could not allocate main table data");
 return EINA_FALSE;
  }
if (!eina_tls_cb_new(&_eo_table_data, _eo_table_del_cb))
  {
-EINA_LOG_ERR("Could not allocate TLS for eo domain data");
+ERR("Could not allocate TLS for eo domain data");
 _eo_table_del_cb(data);
 return EINA_FALSE;
  }

-- 




[EGIT] [core/efl] master 03/03: eo: if EO_DEBUG, check if efl_super() object 'isa' the given class.

2016-12-02 Thread Gustavo Sverzut Barbieri
barbieri pushed a commit to branch master.

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

commit 04450c4ee03fd20271ec4f911667acea10ba1375
Author: Gustavo Sverzut Barbieri 
Date:   Fri Dec 2 14:49:06 2016 -0200

eo: if EO_DEBUG, check if efl_super() object 'isa' the given class.

A common error is to copy & paste efl_super() calls and forget to fix
the class. If usin EO_DEBUG, then use efl_isa() to error.
---
 src/lib/eo/eo.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 9719034..e86f052 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -318,6 +318,11 @@ efl_super(const Eo *obj, const Efl_Class *cur_klass)
 {
EO_CLASS_POINTER_GOTO(cur_klass, klass, err);
 
+   if (EINA_UNLIKELY(!_eo_is_a_obj(obj))) goto err_obj;
+#ifdef EO_DEBUG
+   if (EINA_UNLIKELY(!efl_isa(obj, cur_klass))) goto err_obj_hierarchy;
+#endif
+
/* FIXME: Switch to atomic operations intead of lock. */
eina_spinlock_take(&_super_class_lock);
_super_class = klass;
@@ -326,6 +331,14 @@ efl_super(const Eo *obj, const Efl_Class *cur_klass)
 err:
_EO_POINTER_ERR("Class (%p) is an invalid ref.", cur_klass);
return NULL;
+err_obj:
+   _EO_POINTER_ERR("Object (%p) is an invalid ref, class=%p (%s).", obj, 
cur_klass, efl_class_name_get(cur_klass));
+   return NULL;
+#ifdef EO_DEBUG
+err_obj_hierarchy:
+   _EO_POINTER_ERR("Object (%p) class=%p (%s) is not an instance of class=%p 
(%s).", obj, efl_class_get(obj), efl_class_name_get(obj), cur_klass, 
efl_class_name_get(cur_klass));
+#endif
+   return NULL;
 }
 
 EAPI Eina_Bool

-- 




[EGIT] [website/www-content] master 01/01: Wiki page javascript_tutorial changed with summary [More updates to the twitter example] by Lauro Moura

2016-12-02 Thread Lauro Moura
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=78d2c6e0c64bb70b3764c76eff0b2d6655976df6

commit 78d2c6e0c64bb70b3764c76eff0b2d6655976df6
Author: Lauro Moura 
Date:   Fri Dec 2 08:46:40 2016 -0800

Wiki page javascript_tutorial changed with summary [More updates to the 
twitter example] by Lauro Moura
---
 pages/tutorial/javascript_tutorial.txt | 268 +++--
 1 file changed, 222 insertions(+), 46 deletions(-)

diff --git a/pages/tutorial/javascript_tutorial.txt 
b/pages/tutorial/javascript_tutorial.txt
index 6cb3dec..a6a857b 100644
--- a/pages/tutorial/javascript_tutorial.txt
+++ b/pages/tutorial/javascript_tutorial.txt
@@ -1,5 +1,5 @@
 ~~Title: Javascript Tutorial~~
- Javascript Tutorial [DRAFT]
+ Javascript Tutorial 
 
 This Javascript tutorial describes the basic steps to compile and run a 
Javascript example using EFL with Node.Js
 
@@ -53,7 +53,7 @@ To check if the path is correctly set, use ''require'' inside 
nodejs to import t
 Button Example
 
 
-You can find this example in 
''efl_source/src/examples/elementary/button_example_00.js''
+You can find this example in 
''/src/examples/elementary/button_example_00.js''
 
 
 Import Efl module
@@ -99,105 +99,281 @@ Once finished this setup, the ''efl.node'' module 
automatically integrates with
 Twitter Example
 
 
-You find complete twitter example in 
''elementary_source/src/examples/twitter_example_01.js''
+You can find the complete twitter example in 
''/src/examples/twitter_example_01.js''
 
 
-This is a more complex example, with edje theme and some external 
requirements. We need install ''request'' and ''twitter'' module, for this use 
the ''npm'' (node.js package manager) it downloads and installs all necessary 
to use this modules.
+This is a more complex example, with edje theming and some external 
requirements. We need to install the ''request'' and ''twitter'' nodejs 
modules, using the ''npm'' (node.js package manager) to automatically download 
and install all necessary files:
 
 npm install request
 npm install twitter
 
 ''npm'' is installed by default with Node.js
 
-Import all modules and initialize necessary variables to connect in twitter API
+Import all modules and initialize the necessary variables to connect to the 
twitter API
 
-elm = require('elm');
+efl = require('efl');
+
+// Standard node modules
 util = require('util');
 fs = require('fs');
+path = require('path');
+
+// 3rd pardy modules, requiring install with npm
 request = require('request'); //need "npm install request"
-Twitter = require('twitter'); //need "npm install twitter"
+twitter = require('twitter'); //need "npm install twitter"
 
-var twit = new Twitter({
+// Twitter access keys
+var twit = new twitter({
   consumer_key: 'ZbSM93w5Sp2cyZ2SG0XuCvoHV',
   consumer_secret: 'g8N7EEQLpdKPnAsS9hWuQV29FYjBkhH62jhZzXyYymDw87DKye',
   access_token_key: '222611263-pPhKKjYh59uuNLP0b86sP7aAtLhdecjVQaEsCDCv',
   access_token_secret: 'l7ccNKXTVv6cymfSD1gQH61tmfixkdna2QmOjPtpVxSHD'
 });
 
-user_acount = 'EnlightenmentKo'
-icon_array = new Array();
+user_acount = 'EnlightenmentKo' // our target twitter account to be shown
 
 
-Create a new Window (it has previous example):
+Create a new Window (as in the previous example):
 
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Twitter App");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Twitter App");
 win.setAutohide(true);
 
 
-Create and show a //box// and //list// elementary widget containers 
+Create and show two //box// widget containers, one to be the top level box and 
another to work like a list, with the individual tweets.
+
 
-box = new elm.Elm.Box(win);
-box.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(box);
+box = new efl.Efl.Ui.Box(win);
+box.setHintWeight(1.0, 1.0);
+win.setContent(box);
 box.setVisible(true);
 
-list = new elm.Elm.List(win);
-list.setSizeHintWeight(1.0, 1.0);
-list.setSizeHintAlign(-1.0, -1.0);
-box.packEnd(list);
-list.setVisible(true);
+tweet_box = new efl.Efl.Ui.Box(win);
+tweet_box.setHintWeight(1.0, 1.0);
+tweet_box.setHintAlign(-1.0, -1.0);
+tweet_box.setPackPadding(0.0, 30.0, true); // Give some space between the 
tweets
+box.packEnd(tweet_box);
 
 
-Getting twitter user timeline asynchronous, using callback 
+The default box orientation is horizontal. In order to resemble the original 
timeline appearance, we need to make it horizontal. This is made in two steps, 
first we "cast" the box to an ''Efl.Orientation'' object and then we actually 
set the orientation.
+
+
+This explicit cast is currently required as ''Efl.Ui.Box'' inherits from both 
''Elm.Widget'' and the interface ''Efl.Orientation''. These two 
classes/interfaces define a method called ''setOrientation''. In C you can 
specify which one you want by calling the respective function, e.g. 
''elm_widget_orientation_set'' or ''efl_orientation_orientation_set''. In the 
Javas

[EGIT] [core/enlightenment] master 01/01: luncher: delete the popup if there is already one

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit a4a9a5a6280b189a863c27bfbea41e1b0be451f3
Author: Marcel Hollerbach 
Date:   Fri Dec 2 16:58:29 2016 +0100

luncher: delete the popup if there is already one

Otherwise we have two which are locking the bryce onto the screen
---
 src/modules/luncher/bar.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c
index 3321b69..57ebcfe 100644
--- a/src/modules/luncher/bar.c
+++ b/src/modules/luncher/bar.c
@@ -741,6 +741,9 @@ _bar_icon_preview_show(void *data)
if (!eina_list_count(ic->execs) && !eina_list_count(ic->clients))
  return EINA_FALSE;
 
+   if (ic->preview)
+ elm_popup_dismiss(ic->preview);
+
ic->preview = elm_ctxpopup_add(e_comp->elm);
elm_object_style_set(ic->preview, "noblock");
evas_object_size_hint_min_set(ic->preview, ic->inst->size, ic->inst->size);

-- 




[EGIT] [core/efl] master 01/01: elementary: Remove useless #ifdef

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit def6fe9a3923cb357f115acbfd93397bd01f8e00
Author: Chris Michael 
Date:   Fri Dec 2 11:15:57 2016 -0500

elementary: Remove useless #ifdef

This block is already wrapped around an #ifdef directly above, so this

Signed-off-by: Chris Michael 
---
 src/lib/elementary/efl_ui_win.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index fdcfd26..da07122 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2272,11 +2272,9 @@ _efl_ui_win_hide(Eo *obj, Efl_Ui_Win_Data *sd)
if (sd->pointer.ee)
  {
 ecore_evas_hide(sd->pointer.ee);
-#ifdef HAVE_ELEMENTARY_WL2
 sd->pointer.surf = NULL;
 ecore_wl2_window_pointer_set(sd->wl.win, NULL,
  sd->pointer.hot_x, sd->pointer.hot_y);
-#endif
  }
 #endif
 

-- 




[EGIT] [core/enlightenment] master 01/03: do not pop pointer types on client hide events if the client is pass_events

2016-12-02 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 647e998b72c6abab581cf7920c6d0862c6da4f3c
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 7de61e8..1880baa 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -1399,7 +1399,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] master 03/03: attempt to re-set wl surface pointer when popping back to "default" pointer type

2016-12-02 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit e42b072f38404b0ad179d117126a1881d5d7b24d
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] master 02/03: set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup

2016-12-02 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 5f246e079bd302f5e243dc8c4f1da98f15cc644d
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 3a77da8..9d9eaee 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -74,6 +74,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] master 01/01: remove unused variables in e_comp_wl

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 4aba7e7bebb59a73ddeca093a0a760ddaa02711e
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 01a5ac0..a024e9e 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -595,19 +595,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;
 }
 
@@ -676,8 +669,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;
@@ -696,7 +688,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/efl] master 01/03: ecore_ipc: silence a maybe unitialized warning

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

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

commit 12fccd1d3c51fb15a4a6d28b443573838f239dad
Author: Stefan Schmidt 
Date:   Fri Dec 2 14:47:43 2016 +0100

ecore_ipc: silence a maybe unitialized warning

I always got this during the build:
lib/ecore_ipc/ecore_ipc.c:537:6: warning: ‘old_mask’ may be used 
uninitialized in this function
[-Wmaybe-uninitialized]

Looking at the code it really is a false positive. Gettign the mask is 
behind
an if it is the same if condistion used before writing it. Anyway, 
silencing the
warning here.
---
 src/lib/ecore_ipc/ecore_ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 8b62435..d0cfb78 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -449,7 +449,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, 
int port, const void
char *address = NULL;
Eina_Error err;
 #ifdef EFL_NET_SERVER_UNIX_CLASS
-   mode_t old_mask, new_mask = 0;
+   mode_t old_mask = 0, new_mask = 0;
 #endif
 
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);

-- 




[EGIT] [core/efl] master 03/03: eeze_scanner: server was not always initialized here

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

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

commit bb284620c32f9c8e5bacfa9ea583214efed81fca
Author: Stefan Schmidt 
Date:   Fri Dec 2 16:13:02 2016 +0100

eeze_scanner: server was not always initialized here

The initial assignment is behind and ifdef so make sure we actually start 
with
a sane NULL here.
---
 src/bin/eeze/eeze_scanner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eeze/eeze_scanner.c b/src/bin/eeze/eeze_scanner.c
index adc06c0..e732f4f 100644
--- a/src/bin/eeze/eeze_scanner.c
+++ b/src/bin/eeze/eeze_scanner.c
@@ -446,7 +446,7 @@ server_error(void *data EINA_UNUSED, const Efl_Event *event)
 int
 main(void)
 {
-   Eo *server, *loop;
+   Eo *server = NULL, *loop;
char *path = NULL;
Ecore_Event_Handler *eh;
Eina_List *ehl = NULL;

-- 




[EGIT] [core/efl] master 02/03: efl_ui_win: fix warning about unused parameter

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

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

commit 58e13c569bbb5db6d5ce3ea00bbf8d22431f4174
Author: Stefan Schmidt 
Date:   Fri Dec 2 15:54:16 2016 +0100

efl_ui_win: fix warning about unused parameter

If the ifdef is not hit this is never being used.
---
 src/lib/elementary/efl_ui_win.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 316c7c5..fdcfd26 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1393,6 +1393,7 @@ _elm_win_opaque_update(Efl_Ui_Win_Data *sd, Eina_Bool 
force_alpha)
ecore_wl2_window_input_region_set(sd->wl.win, ox, oy, ow, oh);
 #else
(void)sd;
+   (void)force_alpha;
 #endif
 }
 

-- 




[EGIT] [core/enlightenment] master 01/02: disable xdg6 positioner resize hints

2016-12-02 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 6f4d77d10a0abd8899556b00ac4968db55f19d4f
Author: Mike Blumenkrantz 
Date:   Fri Dec 2 10:04:52 2016 -0500

disable xdg6 positioner resize hints

this is stupid so we're not going to do it

 #leadership
---
 src/modules/wl_desktop_shell/xdg6.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index 22a1455..6146ea9 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -811,12 +811,15 @@ _apply_positioner(E_Client *ec, Positioner *p)
 if (E_CONTAINS(zx, zy, zw, zh, zx, sy, 1, ec->h))
   ec->y = sy;
  }
+#if 0
+//resize_x/y is stupid so we're not going to do it
if (!CONSTRAINED(ec, ec->x, ec->y)) return;
 
if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X) &&
(!E_CONTAINS(zx, zy, zw, zh, ec->x, zy, ec->w, 1)))
  {
 ec->w = zx + zw - ec->x;
+e_client_resize_limit(ec, &ec->w, &ec->h);
 ec->changes.size = 1;
 if (!CONSTRAINED(ec, ec->x, ec->y)) return;
  }
@@ -824,8 +827,10 @@ _apply_positioner(E_Client *ec, Positioner *p)
(!E_CONTAINS(zx, zy, zw, zh, zx, ec->y, 1, ec->h)))
  {
 ec->h = zy + zh - ec->y;
+e_client_resize_limit(ec, &ec->w, &ec->h);
 ec->changes.size = 1;
  }
+#endif
 }
 
 static void

-- 




[EGIT] [core/enlightenment] master 02/02: apply better algorithm during xdg6 positioner slide calc

2016-12-02 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 531fcb857750a4167766bada7a0f2b8a152eb86a
Author: Mike Blumenkrantz 
Date:   Fri Dec 2 10:23:04 2016 -0500

apply better algorithm during xdg6 positioner slide calc

try useful geometry, then base zone geometry. also restrict slide to being
adjacent to parent surface's anchor
---
 src/modules/wl_desktop_shell/xdg6.c | 105 +++-
 1 file changed, 57 insertions(+), 48 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index 6146ea9..a541cbf 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -624,6 +624,10 @@ _e_xdg_toplevel_cb_minimized_set(struct wl_client *client 
EINA_UNUSED, struct wl
ec->comp_data->shell.set.minimize = 1;
 }
 
+
+#define CONSTRAINED(EC, X, Y) \
+   !E_CONTAINS(zx, zy, zw, zh, (X), (Y), (EC)->w, (EC)->h)
+
 static int
 _apply_positioner_x(int x, Positioner *p, Eina_Bool invert)
 {
@@ -708,6 +712,57 @@ _apply_positioner_y(int y, Positioner *p, Eina_Bool invert)
return y;
 }
 
+static Eina_Bool
+_apply_positioner_slide(E_Client *ec, Positioner *p, int zx, int zy, int zw, 
int zh)
+{
+   if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X) &&
+   (!E_CONTAINS(zx, zy, zw, zh, ec->x, zy, ec->w, 1)))
+ {
+int sx = ec->x;
+
+if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_LEFT)
+  {
+ if (ec->x + ec->w > zx + zw)
+   sx = MAX(zx + zw - ec->w, ec->parent->x + p->anchor_rect.x - 
ec->w);
+ else if (ec->x < zx)
+   sx = MIN(zx, ec->parent->x + p->anchor_rect.x + 
p->anchor_rect.w);
+  }
+else if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_RIGHT)
+  {
+ if (ec->x < zx)
+   sx = MIN(zx, ec->parent->x + p->anchor_rect.x + 
p->anchor_rect.w);
+ else if (ec->x + ec->w > zx + zw)
+   sx = MAX(zx + zw - ec->w, ec->parent->x + p->anchor_rect.x - 
ec->w);
+  }
+if (E_CONTAINS(zx, zy, zw, zh, sx, zy, ec->w, 1))
+  ec->x = sx;
+ }
+   if (!CONSTRAINED(ec, ec->x, ec->y)) return EINA_TRUE;
+   if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y) &&
+   (!E_CONTAINS(zx, zy, zw, zh, zx, ec->y, 1, ec->h)))
+ {
+int sy = ec->y;
+
+if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_TOP)
+  {
+ if (ec->y + ec->h > zy + zh)
+   sy = MAX(zy + zh - ec->h, ec->parent->y + p->anchor_rect.y - 
ec->h);
+ else if (ec->y < zy)
+   sy = MIN(zy, ec->parent->y + p->anchor_rect.y + 
p->anchor_rect.h);
+  }
+else if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_BOTTOM)
+  {
+ if (ec->y < zy)
+   sy = MIN(zy, ec->parent->y + p->anchor_rect.y + 
p->anchor_rect.h);
+ else if (ec->y + ec->h > zy + zh)
+   sy = MAX(zy + zh - ec->h, ec->parent->y + p->anchor_rect.y - 
ec->h);
+  }
+if (E_CONTAINS(zx, zy, zw, zh, zx, sy, 1, ec->h))
+  ec->y = sy;
+ }
+   return !CONSTRAINED(ec, ec->x, ec->y);
+}
+
 static void
 _apply_positioner(E_Client *ec, Positioner *p)
 {
@@ -735,9 +790,6 @@ _apply_positioner(E_Client *ec, Positioner *p)
 
e_zone_useful_geometry_get(ec->parent->zone, &zx, &zy, &zw, &zh);
 
-#define CONSTRAINED(EC, X, Y) \
-   !E_CONTAINS(zx, zy, zw, zh, (X), (Y), (EC)->w, (EC)->h)
-
if (!CONSTRAINED(ec, ec->x, ec->y)) return;
 
/* assume smart placement:
@@ -765,52 +817,9 @@ _apply_positioner(E_Client *ec, Positioner *p)
   ec->y = fy;
  }
if (!CONSTRAINED(ec, ec->x, ec->y)) return;
+   if (_apply_positioner_slide(ec, p, zx, zy, zw, zh)) return;
+   _apply_positioner_slide(ec, p, ec->zone->x, ec->zone->y, ec->zone->w, 
ec->zone->h);
 
-   if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X) &&
-   (!E_CONTAINS(zx, zy, zw, zh, ec->x, zy, ec->w, 1)))
- {
-int sx = ec->x;
-
-if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_LEFT)
-  {
- if (ec->x + ec->w > zx + zw)
-   sx = MAX(zx + zw - ec->w, ec->parent->x);
- else if (ec->x + ec->w < zx)
-   sx = zx;
-  }
-else if (p->gravity & ZXDG_POSITIONER_V6_GRAVITY_RIGHT)
-  {
- if (ec->x + ec->w < zx)
-   sx = zx;
- else if (ec->x + ec->w > zx + zw)
-   sx = MAX(zx + zw - ec->w, ec->parent->x);
-  }
-if (E_CONTAINS(zx, zy, zw, zh, sx, zy, ec->w, 1))
-  ec->x = sx;
- }
-   if (!CONSTRAINED(ec, ec->x, ec->y)) return;
-   if ((p->constrain & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y) &&
-   (!E_CONTAINS(zx, zy, zw, zh, zx, ec->y, 1, ec->h)))
- {
-int sy = ec->y;
-
-if (p->gravity &

Re: [E-devel] New EO API documentation system is live on our website

2016-12-02 Thread Gustavo Sverzut Barbieri
Hi stefan,

could the main list
https://www.enlightenment.org/docs/efl/auto/reference show indented
results such as
https://www.enlightenment.org/docs/efl/auto/class/efl/net/socket/unix
hierarchy? Actually if you have control, make the first part of the
text the same bg color, so it doesn't show but one can still Ctrl+F to
search for it :-)

Then inside each page, it would be awesome to have an expanded view
that includes all events and methods that were inherited, since it's
painful to navigate one by one, see that unix example, it inherits
reader, writer, closer, socket...

even nicer is if we could have reverse lookup, showing users of each
class, at least examples using them.



On Fri, Dec 2, 2016 at 11:30 AM, Stefan Schmidt  wrote:
> Hello.
>
> We finally brought some of the pieces together and put our generated EO
> API documentation into the docs section of our main dokuwiki website:
>
> https://www.enlightenment.org/docs/efl/auto/reference
>
> What you can see there is what we currently have in tree. Updates are
> done manually by me right now and I will keep doing this for a while
> until this all gets more stable.
>
> For the main documentation component (properties, methods, events, etc)
> description we want to keep it in the eo fils in the EFL git tree
> itself. For further going docs we want to leverage the dokuwiki
> infrastructure which should also lower the entrance barrier for people
> wanting to contribute to docs.
>
> We need to see how this will all work out in practice. This is not a
> fully completed solution yet so bear with us if there might be problems.
> Let us know about it though :)
>
> Thanks to Raster, Tom and Daniel for hashing out the initial plans for
> this and Daniel for doing all the generator and eolian work this builds on.
>
> regards
> Stefan Schmidt
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



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

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


[EGIT] [core/efl] master 01/01: elementary: Re-enable wayland_egl mouse pointers

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 3a68e9554ab9fe4591ce78903dbad10e0aa1fb4c
Author: Chris Michael 
Date:   Fri Dec 2 09:50:48 2016 -0500

elementary: Re-enable wayland_egl mouse pointers

It appears that the 'black square' issue when using wayland_egl canvas
for mouse pointers is gone now, so re-enable the usage of gl pointers
for elementary windows.

Signed-off-by: Chris Michael 
---
 src/lib/elementary/efl_ui_win.c | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3b1129a..316c7c5 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5022,15 +5022,10 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data 
*sd, const char *name, Elm_W
  Evas *pevas;
  Evas_Coord mw = 1, mh = 1, hx = 0, hy = 0;
 
- /* FIXME: NB:
-  * Disable using wayland_egl engine for mouse pointer right now.
-  * This is being disabled due to an issue in the engine where
-  * a black square is being drawn behind the pointer image */
-
- /* if (!strcmp(engine, ELM_WAYLAND_SHM)) */
- sd->pointer.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 
0);
- /* else if (!strcmp(engine, ELM_WAYLAND_EGL)) */
- /*   sd->pointer.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 
1, 1, 0); */
+ if (!strcmp(engine, ELM_WAYLAND_SHM))
+   sd->pointer.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 
1, 0);
+ else if (!strcmp(engine, ELM_WAYLAND_EGL))
+   sd->pointer.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 
1, 0);
 
  pevas = ecore_evas_get(sd->pointer.ee);
 

-- 




[EGIT] [core/enlightenment] master 01/01: mark Ecore_Thread parameter as EINA_UNUSED

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit ba035ff807b986cbc4ab4615265e90c766fbf599
Author: Chris Michael 
Date:   Fri Dec 2 09:34:24 2016 -0500

mark Ecore_Thread parameter as EINA_UNUSED

Signed-off-by: Chris Michael 
---
 src/modules/temperature/e_mod_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index fce1b8c..c59d0e0 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -314,7 +314,7 @@ _temprature_check_notify(void *data, Ecore_Thread *th, void 
*msg)
 }
 
 static void
-_temprature_check_done(void *data, Ecore_Thread *th)
+_temprature_check_done(void *data, Ecore_Thread *th EINA_UNUSED)
 {
Tempthread *tth  = data;
const char *s;

-- 




[EGIT] [core/enlightenment] master 02/02: verify shell client delete functions are operating on wayland clients.

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 7d8266995d0e4771f2fbe73e699705d2b8f90dc7
Author: Chris Michael 
Date:   Fri Dec 2 09:29:44 2016 -0500

verify shell client delete functions are operating on wayland clients.

ref cc795bfbda6c3272049bc526

Fixes T4958

Signed-off-by: Chris Michael 
---
 src/modules/wl_desktop_shell/xdg5.c | 8 ++--
 src/modules/wl_desktop_shell/xdg6.c | 3 +++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg5.c 
b/src/modules/wl_desktop_shell/xdg5.c
index 7295f16..7d21c61 100644
--- a/src/modules/wl_desktop_shell/xdg5.c
+++ b/src/modules/wl_desktop_shell/xdg5.c
@@ -881,9 +881,13 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data 
EINA_UNUSED, uint32_t
 static void
 _xdg5_client_hook_del(void *d EINA_UNUSED, E_Client *ec)
 {
-   E_Shell_Data *shd = ec->comp_data->shell.data;
+   E_Shell_Data *shd;
+
+   /* make sure this is a wayland client */
+   if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
 
-   if (shd && (shd->version != 5)) return;
+   shd = ec->comp_data->shell.data;
+ if (shd && (shd->version != 5)) return;
if (ec->comp_data->shell.surface)
  e_shell_surface_cb_destroy(ec->comp_data->shell.surface);
 }
diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index d98bfc9..22a1455 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1325,6 +1325,9 @@ _xdg6_client_destroy(E_Client *ec)
 {
E_Shell_Data *shd;
 
+   /* make sure this is a wayland client */
+   if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+
shd = ec->comp_data->shell.data;
if (shd && (shd->version != 6)) return;
if (ec->comp_data->shell.surface)

-- 




[EGIT] [core/enlightenment] master 01/02: Revert "verify valid client comp_data before accessing it directly"

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit cc795bfbda6c3272049bc526156bfb7cfb7f2b8e
Author: Chris Michael 
Date:   Fri Dec 2 09:25:54 2016 -0500

Revert "verify valid client comp_data before accessing it directly"

Reverting this in favor of a different fix.

This reverts commit bbad74406058ec2e373dbd6efe3fa2592a21d8eb.
---
 src/modules/wl_desktop_shell/xdg5.c | 5 +
 src/modules/wl_desktop_shell/xdg6.c | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg5.c 
b/src/modules/wl_desktop_shell/xdg5.c
index 6db889e..7295f16 100644
--- a/src/modules/wl_desktop_shell/xdg5.c
+++ b/src/modules/wl_desktop_shell/xdg5.c
@@ -881,10 +881,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data 
EINA_UNUSED, uint32_t
 static void
 _xdg5_client_hook_del(void *d EINA_UNUSED, E_Client *ec)
 {
-   E_Shell_Data *shd;
-
-   if (!ec->comp_data) return;
-   shd = ec->comp_data->shell.data;
+   E_Shell_Data *shd = ec->comp_data->shell.data;
 
if (shd && (shd->version != 5)) return;
if (ec->comp_data->shell.surface)
diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index dc4b763..d98bfc9 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1325,7 +1325,6 @@ _xdg6_client_destroy(E_Client *ec)
 {
E_Shell_Data *shd;
 
-   if (!ec->comp_data) return;
shd = ec->comp_data->shell.data;
if (shd && (shd->version != 6)) return;
if (ec->comp_data->shell.surface)

-- 




Re: [E-devel] [EGIT] [core/enlightenment] master 02/02: e tempget module - mode to using threads instead of tempget binary

2016-12-02 Thread Mike Blumenkrantz
It looks like this calls eeze (and thus udev) functions in a thread. udev
is not threadsafe, and using eeze's global context in this way will result
in thread collisions.

On Wed, Nov 30, 2016 at 6:50 PM Carsten Haitzler 
wrote:

> raster pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/enlightenment.git/commit/?id=a94ba7cbfdeb310c32b5d4655631d2612e66fb40
>
> commit a94ba7cbfdeb310c32b5d4655631d2612e66fb40
> Author: Carsten Haitzler (Rasterman) 
> Date:   Wed Nov 30 17:06:45 2016 +0900
>
> e tempget module - mode to using threads instead of tempget binary
>
> this should reduce mem usage by a sub binary and aso solve the sub
> shell kill issue too nd still keep the polling of system status out of
> the mainloop and keep it unblocked.
> ---
>  src/modules/Makefile_temperature.mk |  11 +-
>  src/modules/temperature/e_mod_config.c  |  44 +++
>  src/modules/temperature/e_mod_main.c| 236 +---
>  src/modules/temperature/e_mod_main.h|  41 ++-
>  src/modules/temperature/e_mod_tempget.c | 604
> +++---
>  src/modules/temperature/e_mod_udev.c|  70 +---
>  src/modules/temperature/tempget.c   | 634
> 
>  7 files changed, 730 insertions(+), 910 deletions(-)
>
> diff --git a/src/modules/Makefile_temperature.mk b/src/modules/Makefile_
> temperature.mk
> index b583063..d1cb7fb 100644
> --- a/src/modules/Makefile_temperature.mk
> +++ b/src/modules/Makefile_temperature.mk
> @@ -22,14 +22,7 @@ if HAVE_EEZE
>  src_modules_temperature_module_la_SOURCES +=
> src/modules/temperature/e_mod_udev.c
>  endif
>
> -src_modules_temperature_tempgetdir = $(temperaturepkgdir)
> -src_modules_temperature_tempget_PROGRAMS = src/modules/temperature/tempget
> -
> -src_modules_temperature_tempget_CPPFLAGS = $(MOD_CPPFLAGS)
> -src_modules_temperature_tempget_LDADD = $(MOD_LIBS)
> -src_modules_temperature_tempget_SOURCES =
> src/modules/temperature/tempget.c
> -
>  PHONIES += temperature install-temperature
> -temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> $(src_modules_temperature_tempget_PROGRAMS)
> -install-temperature: install-temperatureDATA
> install-temperaturepkgLTLIBRARIES
> install-src_modules_temperature_tempgetPROGRAMS
> +temperature: $(temperaturepkg_LTLIBRARIES) $(temperature_DATA)
> +install-temperature: install-temperatureDATA
> install-temperaturepkgLTLIBRARIES
>  endif
> diff --git a/src/modules/temperature/e_mod_config.c
> b/src/modules/temperature/e_mod_config.c
> index 57f5212..597184e 100644
> --- a/src/modules/temperature/e_mod_config.c
> +++ b/src/modules/temperature/e_mod_config.c
> @@ -37,6 +37,50 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd,
> Evas *evas, E_Config_Dia
>  static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data
> *cfdata);
>  static void _cb_display_changed(void *data, Evas_Object *obj EINA_UNUSED);
>
> +static Eina_List *
> +temperature_get_bus_files(const char *bus)
> +{
> +   Eina_List *result;
> +   Eina_List *therms;
> +   char path[PATH_MAX];
> +   char busdir[PATH_MAX];
> +   char *name;
> +
> +   result = NULL;
> +
> +   snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
> +   /* Look through all the devices for the given bus. */
> +   therms = ecore_file_ls(busdir);
> +
> +   EINA_LIST_FREE(therms, name)
> + {
> +Eina_List *files;
> +char *file;
> +
> +/* Search each device for temp*_input, these should be
> + * temperature devices. */
> +snprintf(path, sizeof(path), "%s/%s", busdir, name);
> +files = ecore_file_ls(path);
> +EINA_LIST_FREE(files, file)
> +  {
> + if ((!strncmp("temp", file, 4)) &&
> + (!strcmp("_input", &file[strlen(file) - 6])))
> +   {
> +  char *f;
> +
> +  snprintf(path, sizeof(path),
> +   "%s/%s/%s", busdir, name, file);
> +  f = strdup(path);
> +  if (f) result = eina_list_append(result, f);
> +   }
> + free(file);
> +  }
> +free(name);
> + }
> +   return result;
> +}
> +
> +
>  void
>  config_temperature_module(Config_Face *inst)
>  {
> diff --git a/src/modules/temperature/e_mod_main.c
> b/src/modules/temperature/e_mod_main.c
> index 345b7e6..41e1c38 100644
> --- a/src/modules/temperature/e_mod_main.c
> +++ b/src/modules/temperature/e_mod_main.c
> @@ -83,7 +83,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id,
> const char *style)
>
> o = edje_object_add(gc->evas);
> e_theme_edje_object_set(o, "base/theme/modules/temperature",
> -  "e/modules/temperature/main");
> +   "e/modules/temperature/main");
>
> gcc = e_gadcon_client_new(gc, name, id, style, o);
> gcc->data = inst;
> @@ -92,37 +92,13 @@ _gc_init(E_Gadcon *gc, const char *name, const char
> *id, const char *style)
> inst->o_temp 

[EGIT] [core/enlightenment] master 01/01: verify valid client comp_data before accessing it directly

2016-12-02 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit bbad74406058ec2e373dbd6efe3fa2592a21d8eb
Author: Chris Michael 
Date:   Fri Dec 2 09:07:47 2016 -0500

verify valid client comp_data before accessing it directly

ref 8173c06c4d666

Fixes T4958

Signed-off-by: Chris Michael 
---
 src/modules/wl_desktop_shell/xdg5.c | 5 -
 src/modules/wl_desktop_shell/xdg6.c | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/modules/wl_desktop_shell/xdg5.c 
b/src/modules/wl_desktop_shell/xdg5.c
index 7295f16..6db889e 100644
--- a/src/modules/wl_desktop_shell/xdg5.c
+++ b/src/modules/wl_desktop_shell/xdg5.c
@@ -881,7 +881,10 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data 
EINA_UNUSED, uint32_t
 static void
 _xdg5_client_hook_del(void *d EINA_UNUSED, E_Client *ec)
 {
-   E_Shell_Data *shd = ec->comp_data->shell.data;
+   E_Shell_Data *shd;
+
+   if (!ec->comp_data) return;
+   shd = ec->comp_data->shell.data;
 
if (shd && (shd->version != 5)) return;
if (ec->comp_data->shell.surface)
diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index d98bfc9..dc4b763 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1325,6 +1325,7 @@ _xdg6_client_destroy(E_Client *ec)
 {
E_Shell_Data *shd;
 
+   if (!ec->comp_data) return;
shd = ec->comp_data->shell.data;
if (shd && (shd->version != 6)) return;
if (ec->comp_data->shell.surface)

-- 




[E-devel] New EO API documentation system is live on our website

2016-12-02 Thread Stefan Schmidt
Hello.

We finally brought some of the pieces together and put our generated EO 
API documentation into the docs section of our main dokuwiki website:

https://www.enlightenment.org/docs/efl/auto/reference

What you can see there is what we currently have in tree. Updates are 
done manually by me right now and I will keep doing this for a while 
until this all gets more stable.

For the main documentation component (properties, methods, events, etc) 
description we want to keep it in the eo fils in the EFL git tree 
itself. For further going docs we want to leverage the dokuwiki 
infrastructure which should also lower the entrance barrier for people 
wanting to contribute to docs.

We need to see how this will all work out in practice. This is not a 
fully completed solution yet so bear with us if there might be problems. 
Let us know about it though :)

Thanks to Raster, Tom and Daniel for hashing out the initial plans for 
this and Daniel for doing all the generator and eolian work this builds on.

regards
Stefan Schmidt

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


[EGIT] [website/www-content] master 01/01: www: docs: Add link to new EO reference docs to make them discoverable

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

http://git.enlightenment.org/website/www-content.git/commit/?id=cc4607c48ffe30034997abe4468dd0271fdb5a40

commit cc4607c48ffe30034997abe4468dd0271fdb5a40
Author: Stefan Schmidt 
Date:   Fri Dec 2 13:57:15 2016 +0100

www: docs: Add link to new EO reference docs to make them discoverable
---
 pages/docs.txt | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pages/docs.txt b/pages/docs.txt
index 85f7cce..2fbf3d2 100644
--- a/pages/docs.txt
+++ b/pages/docs.txt
@@ -100,4 +100,8 @@ improving our API references a lot.
 === Last Release ===
 
   * [[http://docs.enlightenment.org/efl/current|EFL]]
-  * [[http://docs.enlightenment.org/python-efl/current|Python Bindings]]
\ No newline at end of file
+  * [[http://docs.enlightenment.org/python-efl/current|Python Bindings]]
+
+=== Our upcoming EO based API documentation ===
+
+  * [[docs/efl/auto/reference|EFL EO API documentation]]

-- 




Re: [E-devel] [RFC] What to do with event registered during there own execution

2016-12-02 Thread Gustavo Sverzut Barbieri
On Fri, Dec 2, 2016 at 2:58 AM, Carsten Haitzler  wrote:
> On Thu, 1 Dec 2016 12:36:28 -0200 Gustavo Sverzut Barbieri 
> 
> said:
>
>> On Thu, Dec 1, 2016 at 6:33 AM, Carsten Haitzler  
>> wrote:
>> > On Wed, 30 Nov 2016 21:58:19 -0800 Cedric BAIL  said:
>> >
>> >> Hello,
>> >>
>> >> So we have currently a bug showing up for some people, that is
>> >> actually related to how we handle event when a callback is registered
>> >> from within a call triggered by that same event. There is a few
>> >> possible behavior :
>> >>
>> >> - Do not call the callback until the next time the event is triggered.
>> >> - If inserted before the currently executed callback, do not call, if
>> >> after do trigger the call.
>> >> - Trigger the call whatever the position of insertion (maybe even
>> >> trigger it right away if it was inserted before)
>> >>
>> >> I am leaning toward the first case, but I am not really sure this is a
>> >> good idea in all case. Any one with a good reason why we should do any
>> >> of the other possibility ?
>> >
>> > hmm. i think it's more complex than this. so some pseudocode:
>> >
>> > -> event_call(obj, ev1)
>> > ---> event_cb_add(obj, ev1)
>> >
>> > so what to do here? when the event cb is added to the
>> > end of the array should it be called again while event_call() is still
>> > calling.. in this case i'd say it shouldn't.
>> >
>> > now here comes the complex stuff:
>> >
>> > -> event_call(obj, ev1)
>> > ---> event_cb_add(obj, ev1)
>> > ---> event_call(obj, ev1)
>> >
>> > so now what? inside the 2nd event_call should we call the callback we just
>> > added before? yes. i'd say so... now combine with the 1st case above. ..
>> > what happens when we go back and return to the FIRST event_call. we called
>> > in the child event_call()... should we call in the parent? h i'd
>> > say no.
>> >
>> > how do we make this work AND make it efficient? but the above 2 cases are
>> > pretty much a core concept that would expand to all other cases up and down
>> > the stack. i agree that once you add an event that future event callback
>> > calls should trigger it... but only future event callback calls that are
>> > STARTED after the event cb add. not existing ones that are still "being
>> > processed".
>>
>> agreed this is the expected behavior, however pretty uncommon in real
>> life scenario to emit the event from the event callback of the same
>> object, after all if done naively this can trigger infinite recursion.
>
> even if uncommon... it's still something we have to handle. in fact this can
> happen as side-effects. like:
>
> on mouse enter...
>   move object
>   move of object indirectly causes a mouse out e.g. it shows an object on top
> mouse out handler raises original object
>   original object now gets a mouse in...
> ... repeat
>
> :) or things like this happen where feedback loops happen. often these 
> feedback
> lops are shortcut somehow and don't recurse forever it is does mean that you
> can have a mouse in called on an obj inside the mouse in and if you add/remove
> mouse in callbacks this can all be affected.
>
> either way we need a simple and consistent behaviour that works the same way
> all the time AND is "logical" and "makes sense". what this is about is... what
> makes sense?
>
> above is what i proposed makes sense to me... it seems to make sense to you.
> what about others...

Yes, I do agree with fixing it for once and for all, as you said these
cases will happen... and we must handle them. What I tried to say is
that our performance impact should be minimal on the usual case,
optimize for that. Marcel's solution seems to do it nicely (in text, I
did not check the patch).


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

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


[EGIT] [core/efl] master 01/01: eo event callback frame make them single linked to save a bit of overhead

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

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

commit a817d2f632342ef647ea466d445f466715a1aec0
Author: Carsten Haitzler (Rasterman) 
Date:   Fri Dec 2 21:26:07 2016 +0900

eo event callback frame make them single linked to save a bit of overhead

this makes the callback event frame single linked with a little less
inlist overhead asa result.
---
 src/lib/eo/eo_base_class.c | 54 +-
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 3a85983..eac4bbb 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -13,14 +13,16 @@
 
 static int event_freeze_count = 0;
 
-typedef struct _Eo_Callback_Description Eo_Callback_Description;
+typedef struct _Eo_Callback_Description  Eo_Callback_Description;
+typedef struct _Efl_Event_Callback_Frame Efl_Event_Callback_Frame;
 
-typedef struct {
-   EINA_INLIST;
-   unsigned int idx;
-   unsigned int inserted_before;
-   unsigned short generation;
-} Efl_Event_Callback_Frame;
+struct _Efl_Event_Callback_Frame
+{
+   Efl_Event_Callback_Frame *next;
+   unsigned int  idx;
+   unsigned int  inserted_before;
+   unsigned shortgeneration;
+};
 
 typedef struct
 {
@@ -41,8 +43,8 @@ typedef struct
 
Eina_Inlist   *current;
 
+   Efl_Event_Callback_Frame  *event_frame;
Eo_Callback_Description  **callbacks;
-   Eina_Inlist*event_frame;
unsigned int   callbacks_count;
 
unsigned short event_freeze_count;
@@ -56,11 +58,12 @@ typedef struct
Eina_Bool  parent_sunk : 1; // If parent ref has already 
been settled (parent has been set, or we are in add_ref mode
 } Efl_Object_Data;
 
-typedef enum {
- DATA_PTR,
- DATA_OBJ,
- DATA_OBJ_WEAK,
- DATA_VAL
+typedef enum
+{
+   DATA_PTR,
+   DATA_OBJ,
+   DATA_OBJ_WEAK,
+   DATA_VAL
 } Eo_Generic_Data_Node_Type;
 
 typedef struct
@@ -83,8 +86,13 @@ typedef struct
unsigned int current;
 } Eo_Current_Callback_Description;
 
-#define EVENT_STACK_PUSH(pd, fr) pd->event_frame = 
eina_inlist_prepend(pd->event_frame , EINA_INLIST_GET(fr));
-#define EVENT_STACK_POP(pd) pd->event_frame = 
eina_inlist_remove(pd->event_frame, pd->event_frame);
+#define EVENT_STACK_PUSH(pd, fr) do { \
+   (fr)->next = (pd)->event_frame; \
+   (pd)->event_frame = (fr); \
+} while (0)
+#define EVENT_STACK_POP(pd) do { \
+   if ((pd)->event_frame) (pd)->event_frame = (pd)->event_frame->next; \
+} while (0)
 
 static int _eo_nostep_alloc = -1;
 
@@ -1105,6 +1113,7 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, 
Eo_Callback_Description *cb)
 {
Eo_Callback_Description **itr;
unsigned int length, j;
+   Efl_Event_Callback_Frame *frame;
 
// Do a dichotomic searh
j = _eo_callback_search_sorted_near(pd, cb);
@@ -1138,16 +1147,11 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, 
Eo_Callback_Description *cb)
 
pd->callbacks_count++;
 
-   //update possible event emissions
-   {
-  Efl_Event_Callback_Frame *frame;
-
-  EINA_INLIST_FOREACH(pd->event_frame , frame)
-{
-   if (itr-pd->callbacks < frame->idx)
- frame->inserted_before ++;
-}
-   }
+   // Update possible event emissions
+   for (frame = pd->event_frame; frame; frame = frame->next)
+ {
+if (itr-pd->callbacks < frame->idx) frame->inserted_before++;
+ }
 }
 
 static unsigned char

-- 




[EGIT] [core/efl] master 03/06: Ecore Evas VNC: Properly set/unset the key locks.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit f442bd74d22899c8b3c0100463fd780958e62a7f
Author: Guilherme Iscaro 
Date:   Wed Nov 9 11:40:57 2016 -0200

Ecore Evas VNC: Properly set/unset the key locks.

Key locks must be unset only another they down is received,
otherwise they must remain active.
---
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  | 36 +-
 1 file changed, 28 insertions(+), 8 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 8f78f40..0885162 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
@@ -279,8 +279,9 @@ _ecore_evas_vnc_server_client_connection_new(rfbClientRec 
*client)
 }
 
 static unsigned int
-_ecore_evas_vnc_server_modifier_to_ecore_modifier(int mod)
+_ecore_evas_vnc_server_modifier_to_ecore_modifier(int mod, Eina_Bool *is_lock)
 {
+   *is_lock = EINA_FALSE;
if (mod == XK_Shift_L || mod == XK_Shift_R)
  return ECORE_EVENT_MODIFIER_SHIFT;
if (mod == XK_Control_L || mod == XK_Control_R)
@@ -290,13 +291,25 @@ _ecore_evas_vnc_server_modifier_to_ecore_modifier(int mod)
if (mod == XK_Super_L || mod == XK_Super_R)
  return ECORE_EVENT_MODIFIER_WIN;
if (mod == XK_Scroll_Lock)
- return ECORE_EVENT_LOCK_SCROLL;
+ {
+*is_lock = EINA_TRUE;
+return ECORE_EVENT_LOCK_SCROLL;
+ }
if (mod == XK_Num_Lock)
- return ECORE_EVENT_LOCK_NUM;
+ {
+*is_lock = EINA_TRUE;
+return ECORE_EVENT_LOCK_NUM;
+ }
if (mod == XK_Caps_Lock)
- return ECORE_EVENT_LOCK_CAPS;
+ {
+*is_lock = EINA_TRUE;
+return ECORE_EVENT_LOCK_CAPS;
+ }
if (mod == XK_Shift_Lock)
- return ECORE_EVENT_LOCK_SHIFT;
+ {
+*is_lock = EINA_TRUE;
+return ECORE_EVENT_LOCK_SHIFT;
+ }
return 0;
 }
 
@@ -360,11 +373,18 @@ _ecore_evas_vnc_server_client_keyboard_event(rfbBool down,
 
if (key >= XK_Shift_L && key <= XK_Hyper_R)
  {
-int mod = _ecore_evas_vnc_server_modifier_to_ecore_modifier(key);
+Eina_Bool is_lock;
+int mod = _ecore_evas_vnc_server_modifier_to_ecore_modifier(key,
+&is_lock);
 
 if (down)
-  cdata->key_modifiers |= mod;
-else
+  {
+ if (!is_lock || !(cdata->key_modifiers & mod))
+   cdata->key_modifiers |= mod;
+ else
+   cdata->key_modifiers &= ~mod;
+  }
+else if (!is_lock)
   cdata->key_modifiers &= ~mod;
  }
 

-- 




[EGIT] [core/efl] master 04/06: Evas: Add support for per seat modifiers and locks.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit c3ed1d3154a0a3fda0dfb05b428f686422e779a6
Author: Guilherme Iscaro 
Date:   Mon Nov 7 16:44:46 2016 -0200

Evas: Add support for per seat modifiers and locks.

This patch introduces possibility to enable key locks and modifers by seat.
It's very useful when the user has two keyboards attached to different 
seats.
---
 src/lib/evas/Evas_Common.h  |  55 ++-
 src/lib/evas/canvas/efl_input_key.c |  11 ++-
 src/lib/evas/canvas/efl_input_pointer.c |  12 ++-
 src/lib/evas/canvas/evas_canvas.eo  |  93 +++---
 src/lib/evas/canvas/evas_device.c   |   2 +
 src/lib/evas/canvas/evas_events.c   |  18 ++--
 src/lib/evas/canvas/evas_key.c  | 164 ++--
 src/lib/evas/canvas/evas_main.c |  11 +++
 src/lib/evas/include/evas_private.h |   6 +-
 9 files changed, 294 insertions(+), 78 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 5ae1626..2f54174 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3449,7 +3449,7 @@ EAPI voidevas_language_reinit(void);
  * @{
  */
 /**
- * Checks the state of a given modifier key, at the time of the
+ * Checks the state of a given modifier of the default seat, at the time of the
  * call. If the modifier is set, such as shift being pressed, this
  * function returns @c Eina_True.
  *
@@ -3465,11 +3465,35 @@ EAPI voidevas_language_reinit(void);
  * @see evas_key_modifier_get
  * @see evas_key_modifier_on
  * @see evas_key_modifier_off
+ * @see evas_seat_key_modifier_is_set
  */
 EAPI Eina_Boolevas_key_modifier_is_set(const Evas_Modifier *m, 
const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
-
 /**
- * Checks the state of a given lock key, at the time of the call. If
+ * Checks the state of a given modifier key of a given seat, at the time of the
+ * call. If the modifier is set, such as shift being pressed, this
+ * function returns @c Eina_True.
+ *
+ * @param m The current modifiers set, as returned by
+ *evas_key_modifier_get().
+ * @param keyname The name of the modifier key to check status for.
+ * @param seat The seat to check if the lock is set. Use @c NULL for the 
default seat.
+ *
+ * @return @c Eina_True if the modifier key named @p keyname is on, @c
+ * Eina_False otherwise.
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_del
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_off
+ * @see evas_seat_key_modifier_on
+ * @see evas_seat_key_modifier_off
+ * @see evas_key_modifier_is_set
+ * @since 1.19
+ */
+EAPI Eina_Boolevas_seat_key_modifier_is_set(const Evas_Modifier 
*m, const char *keyname, const Evas_Device *seat) EINA_WARN_UNUSED_RESULT 
EINA_ARG_NONNULL(1, 2);
+/**
+ * Checks the state of a given lock key of the default seat, at the time of 
the call. If
  * the lock is set, such as caps lock, this function returns @c
  * Eina_True.
  *
@@ -3484,10 +3508,35 @@ EAPI Eina_Bool
evas_key_modifier_is_set(const Evas_Modifier *m, const
  * @see evas_key_lock_del
  * @see evas_key_lock_on
  * @see evas_key_lock_off
+ * @see evas_seat_key_lock_on
+ * @see evas_seat_key_lock_off
+ * @see evas_seat_key_lock_is_set
  */
 EAPI Eina_Boolevas_key_lock_is_set(const Evas_Lock *l, const char 
*keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
 
 /**
+ * Checks the state of a given lock key of a given seat, at the time of the 
call. If
+ * the lock is set, such as caps lock, this function returns @c
+ * Eina_True.
+ *
+ * @param l The current locks set, as returned by evas_key_lock_get().
+ * @param keyname The name of the lock key to check status for.
+ * @param seat The seat to check if the lock is set. Use @c NULL for the 
default seat.
+ *
+ * @return @c Eina_True if the @p keyname lock key is set, @c
+ *Eina_False otherwise.
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_add
+ * @see evas_key_lock_del
+ * @see evas_key_lock_on
+ * @see evas_key_lock_off
+ * @see evas_key_lock_is_set
+ * @since 1.19
+ */
+EAPI Eina_Boolevas_seat_key_lock_is_set(const Evas_Lock *l, const 
char *keyname, const Evas_Device *seat) EINA_WARN_UNUSED_RESULT 
EINA_ARG_NONNULL(1, 2);
+
+/**
  * @}
  */
 
diff --git a/src/lib/evas/canvas/efl_input_key.c 
b/src/lib/evas/canvas/efl_input_key.c
index 387723b..685b6b3 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -242,15 +242,22 @@ _efl_input_key_efl_input_event_device_get(Eo *obj 
EINA_UNUSED, Efl_Input_Key_Dat
 EOLIAN static Eina_Bool
 _efl_input_key_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, 
Efl_Input_Key_Data *pd, const char * name)
 {
+   Efl_Input_Device *seat;
+
if (!pd->modifiers) 

[EGIT] [core/efl] master 06/06: Merge branch 'devs/iscaro/locks_and_mods'

2016-12-02 Thread Bruno Dilly
bdilly pushed a commit to branch master.

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

commit 5fdc93c02e0743c8750cd1a03d2f3a6b4df61278
Merge: 2ce2a65 ad1d160
Author: Bruno Dilly 
Date:   Fri Dec 2 09:58:18 2016 -0200

Merge branch 'devs/iscaro/locks_and_mods'

This series add support to setting mode and properties
of mouse pointer, enabling key locks and modifiers per device
on Evas.

Also it fixes Ecore Input Evas keeping an evas device
on Ecore_Input_Last struct to separate event sources and
add support to lock / modifiers per seat.

With that, multiseat support should be complete up
to Evas layer.

Patches by Guilherme Iscaro 
Differential Revision: https://phab.enlightenment.org/D4415

@feature

 src/lib/ecore_input_evas/Ecore_Input_Evas.h|3 +
 src/lib/ecore_input_evas/ecore_input_evas.c|   80 +-
 src/lib/evas/Evas_Common.h |   55 +-
 src/lib/evas/canvas/efl_canvas_object.eo   |   33 +-
 src/lib/evas/canvas/efl_input_key.c|   11 +-
 src/lib/evas/canvas/efl_input_pointer.c|   12 +-
 src/lib/evas/canvas/evas_canvas.eo |  145 ++-
 src/lib/evas/canvas/evas_clip.c|   26 +-
 src/lib/evas/canvas/evas_device.c  |   32 +-
 src/lib/evas/canvas/evas_events.c  | 1136 ++--
 src/lib/evas/canvas/evas_events_legacy.c   |   10 +-
 src/lib/evas/canvas/evas_key.c |  164 ++-
 src/lib/evas/canvas/evas_layer.c   |   15 +-
 src/lib/evas/canvas/evas_main.c|  164 ++-
 src/lib/evas/canvas/evas_map.c |   14 +-
 src/lib/evas/canvas/evas_object_line.c |   32 +-
 src/lib/evas/canvas/evas_object_main.c |  149 +--
 src/lib/evas/canvas/evas_object_polygon.c  |   51 +-
 src/lib/evas/canvas/evas_object_text.c |   63 +-
 src/lib/evas/canvas/evas_object_textgrid.c |   27 +-
 src/lib/evas/canvas/evas_stack.c   |   64 +-
 src/lib/evas/include/evas_private.h|   74 +-
 .../engines/wayland/ecore_evas_wayland_common.c|5 +-
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  |   36 +-
 24 files changed, 1663 insertions(+), 738 deletions(-)

-- 




[EGIT] [core/efl] master 01/06: Ecore Input Evas: Ecore_Input_Last should contain the Evas device.

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit 5442e9c908f3a846aab9758cfb905234e8686e53
Author: Guilherme Iscaro 
Date:   Thu Dec 1 12:29:54 2016 -0200

Ecore Input Evas: Ecore_Input_Last should contain the Evas device.

This struct should contain the Evas device that originated the event,
otherwise events from different devices may mix up and lead to undifined
behaviour.
---
 src/lib/ecore_input_evas/ecore_input_evas.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c 
b/src/lib/ecore_input_evas/ecore_input_evas.c
index 1cef2da..6e37cc6 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -47,6 +47,7 @@ struct _Ecore_Input_Last
 {
Ecore_Event_Mouse_Button *ev;
Ecore_Timer *timer;
+   Evas_Device *evas_device;
 
unsigned int device;
unsigned int buttons;
@@ -122,14 +123,16 @@ _ecore_event_last_check(Ecore_Event_Last *eel, 
Ecore_Event_Press press)
 }
 
 static Ecore_Event_Last *
-_ecore_event_evas_lookup(unsigned int device, unsigned int buttons, 
Ecore_Window win, Eina_Bool create_new)
+_ecore_event_evas_lookup(Evas_Device *evas_device, unsigned int device,
+ unsigned int buttons, Ecore_Window win,
+ Eina_Bool create_new)
 {
Ecore_Event_Last *eel;
Eina_List *l;
 
//the number of last event is small, simple check is ok.
EINA_LIST_FOREACH(_last_events, l, eel)
- if ((eel->device == device) && (eel->buttons == buttons))
+ if ((eel->device == device) && (eel->buttons == buttons) && 
(eel->evas_device == evas_device))
return eel;
if (!create_new) return NULL;
eel = malloc(sizeof (Ecore_Event_Last));
@@ -142,6 +145,7 @@ _ecore_event_evas_lookup(unsigned int device, unsigned int 
buttons, Ecore_Window
eel->state = ECORE_INPUT_NONE;
eel->faked = EINA_FALSE;
eel->win = win;
+   eel->evas_device = evas_device;
 
_last_events = eina_list_append(_last_events, eel);
return eel;
@@ -182,7 +186,7 @@ 
_ecore_event_evas_push_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Pre
Ecore_Input_Action action = ECORE_INPUT_CONTINUE;
 
//_ecore_event_evas_mouse_button already check press or cancel without 
history
-   eel = _ecore_event_evas_lookup(e->multi.device, e->buttons, e->window, 
EINA_TRUE);
+   eel = _ecore_event_evas_lookup(e->dev, e->multi.device, e->buttons, 
e->window, EINA_TRUE);
if (!eel) return EINA_FALSE;
INF("dev(%d), button(%d), last_press(%d), press(%d)", e->multi.device, 
e->buttons, eel->state, press);
 
@@ -491,7 +495,7 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, 
Ecore_Event_Press pr
if (press != ECORE_DOWN)
  {
 //ECORE_UP or ECORE_CANCEL
-eel = _ecore_event_evas_lookup(e->multi.device, e->buttons, e->window, 
EINA_FALSE);
+eel = _ecore_event_evas_lookup(e->dev, e->multi.device, e->buttons, 
e->window, EINA_FALSE);
 if (!eel)
   {
  WRN("ButtonEvent has no history.");

-- 




[EGIT] [core/efl] master 05/06: Ecore Input Evas: Add ecore_event_evas_seat_modifier_lock_update().

2016-12-02 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

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

commit ad1d160bb62f568940ab6702a559e5b108b0cac0
Author: Guilherme Iscaro 
Date:   Wed Nov 9 11:44:18 2016 -0200

Ecore Input Evas: Add ecore_event_evas_seat_modifier_lock_update().

This function will set the modifiers/lock per seat in Evas.
Some places will still use ecore_event_evas_modifier_lock_update(),
since multi-seat is not supported.
---
 src/lib/ecore_input_evas/Ecore_Input_Evas.h|  3 +
 src/lib/ecore_input_evas/ecore_input_evas.c| 68 +-
 .../engines/wayland/ecore_evas_wayland_common.c|  5 +-
 3 files changed, 48 insertions(+), 28 deletions(-)

diff --git a/src/lib/ecore_input_evas/Ecore_Input_Evas.h 
b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
index c9b0c05..e126e45 100644
--- a/src/lib/ecore_input_evas/Ecore_Input_Evas.h
+++ b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
@@ -59,6 +59,9 @@ EAPI void  ecore_event_window_ignore_events(Ecore_Window 
id, int ignore_even
 
 EAPI void  ecore_event_evas_modifier_lock_update(Evas *e, unsigned int 
modifiers);
 
+EAPI void ecore_event_evas_seat_modifier_lock_update(Evas *e, unsigned int 
modifiers,
+ Evas_Device *seat); /**< 
@since 1.19 */
+
 #ifdef ECORE_EVAS_INTERNAL
 typedef Eina_Bool (*Ecore_Event_Direct_Input_Cb)(void *window, int type, const 
void *info);
 EAPI void  _ecore_event_window_direct_cb_set(Ecore_Window id, 
Ecore_Event_Direct_Input_Cb fptr);
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c 
b/src/lib/ecore_input_evas/ecore_input_evas.c
index 6e37cc6..735ad27 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -278,50 +278,57 @@ _ecore_event_evas_push_mouse_move(Ecore_Event_Mouse_Move 
*e)
 }
 
 EAPI void
-ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers)
+ecore_event_evas_seat_modifier_lock_update(Evas *e, unsigned int modifiers,
+   Evas_Device *seat)
 {
if (modifiers & ECORE_EVENT_MODIFIER_SHIFT)
- evas_key_modifier_on(e, "Shift");
-   else evas_key_modifier_off(e, "Shift");
+ evas_seat_key_modifier_on(e, "Shift", seat);
+   else evas_seat_key_modifier_off(e, "Shift", seat);
 
if (modifiers & ECORE_EVENT_MODIFIER_CTRL)
- evas_key_modifier_on(e, "Control");
-   else evas_key_modifier_off(e, "Control");
+ evas_seat_key_modifier_on(e, "Control", seat);
+   else evas_seat_key_modifier_off(e, "Control", seat);
 
if (modifiers & ECORE_EVENT_MODIFIER_ALT)
- evas_key_modifier_on(e, "Alt");
-   else evas_key_modifier_off(e, "Alt");
+ evas_seat_key_modifier_on(e, "Alt", seat);
+   else evas_seat_key_modifier_off(e, "Alt", seat);
 
if (modifiers & ECORE_EVENT_MODIFIER_WIN)
  {
-evas_key_modifier_on(e, "Super");
-evas_key_modifier_on(e, "Hyper");
+evas_seat_key_modifier_on(e, "Super", seat);
+evas_seat_key_modifier_on(e, "Hyper", seat);
  }
else
  {
-evas_key_modifier_off(e, "Super");
-evas_key_modifier_off(e, "Hyper");
+evas_seat_key_modifier_off(e, "Super", seat);
+evas_seat_key_modifier_off(e, "Hyper", seat);
  }
 
if (modifiers & ECORE_EVENT_MODIFIER_ALTGR)
- evas_key_modifier_on(e, "AltGr");
-   else evas_key_modifier_off(e, "AltGr");
+ evas_seat_key_modifier_on(e, "AltGr", seat);
+   else evas_seat_key_modifier_off(e, "AltGr", seat);
 
if (modifiers & ECORE_EVENT_LOCK_SCROLL)
- evas_key_lock_on(e, "Scroll_Lock");
-   else evas_key_lock_off(e, "Scroll_Lock");
+ evas_seat_key_lock_on(e, "Scroll_Lock", seat);
+   else evas_seat_key_lock_off(e, "Scroll_Lock", seat);
 
if (modifiers & ECORE_EVENT_LOCK_NUM)
- evas_key_lock_on(e, "Num_Lock");
-   else evas_key_lock_off(e, "Num_Lock");
+ evas_seat_key_lock_on(e, "Num_Lock", seat);
+   else evas_seat_key_lock_off(e, "Num_Lock", seat);
 
if (modifiers & ECORE_EVENT_LOCK_CAPS)
- evas_key_lock_on(e, "Caps_Lock");
-   else evas_key_lock_off(e, "Caps_Lock");
+ evas_seat_key_lock_on(e, "Caps_Lock", seat);
+   else evas_seat_key_lock_off(e, "Caps_Lock", seat);
 
if (modifiers & ECORE_EVENT_LOCK_SHIFT)
- evas_key_lock_on(e, "Shift_Lock");
-   else evas_key_lock_off(e, "Shift_Lock");
+ evas_seat_key_lock_on(e, "Shift_Lock", seat);
+   else evas_seat_key_lock_off(e, "Shift_Lock", seat);
+}
+
+EAPI void
+ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers)
+{
+   ecore_event_evas_seat_modifier_lock_update(e, modifiers, NULL);
 }
 
 EAPI void
@@ -412,7 +419,9 @@ _ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press 
press)
 
lookup = _ecore_event_window_match(e->event_window);
if (!lookup) return ECORE_CALLBACK_PASS_ON;
-   ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
+   ecore_event_evas_seat_mo

[EGIT] [core/efl] master 06/06: eo: adjust generation count

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit 2ce2a6514899e1c47c4a58f2c5305d62cddf1a7c
Author: Marcel Hollerbach 
Date:   Fri Dec 2 11:39:57 2016 +0100

eo: adjust generation count

raster suggested a few optimizations
---
 src/lib/eo/eo_base_class.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index fe8cd78..3a85983 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -19,7 +19,7 @@ typedef struct {
EINA_INLIST;
unsigned int idx;
unsigned int inserted_before;
-   unsigned char generation;
+   unsigned short generation;
 } Efl_Event_Callback_Frame;
 
 typedef struct
@@ -42,9 +42,8 @@ typedef struct
Eina_Inlist   *current;
 
Eo_Callback_Description  **callbacks;
-   unsigned int   callbacks_count;
-
Eina_Inlist*event_frame;
+   unsigned int   callbacks_count;
 
unsigned short event_freeze_count;
 #ifdef EFL_EVENT_SPECIAL_SKIP
@@ -921,7 +920,7 @@ struct _Eo_Callback_Description
void *func_data;
Efl_Callback_Priority priority;
 
-   unsigned char generation;
+   unsigned short generation;
 
Eina_Bool delete_me : 1;
Eina_Bool func_array : 1;

-- 




[EGIT] [core/efl] master 03/06: eo: use the event stack to define behaviour

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit 0f72c8a031e885ff2d28c2ab1c58d45c1186f102
Author: Marcel Hollerbach 
Date:   Thu Dec 1 12:40:36 2016 +0100

eo: use the event stack to define behaviour

subscriptions are only executed if they were already subscriped at the
start of the event emission.
---
 src/lib/eo/eo_base_class.c | 36 ++--
 src/tests/eo/suite/eo_test_event.c |  9 +++--
 2 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index f096891..1bc80ba 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -19,6 +19,7 @@ typedef struct {
EINA_INLIST;
unsigned int idx;
unsigned int inserted_before;
+   unsigned char generation;
 } Efl_Event_Callback_Frame;
 
 typedef struct
@@ -51,8 +52,8 @@ typedef struct
unsigned short event_cb_efl_event_callback_del_count;
unsigned short event_cb_efl_event_del_count;
 #endif
-   Eina_Bool  deletions_waiting : 1;
Eina_Bool  callback_stopped : 1;
+   Eina_Bool  need_cleaning : 1;
Eina_Bool  parent_sunk : 1; // If parent ref has already 
been settled (parent has been set, or we are in add_ref mode
 } Efl_Object_Data;
 
@@ -920,6 +921,8 @@ struct _Eo_Callback_Description
void *func_data;
Efl_Callback_Priority priority;
 
+   unsigned char generation;
+
Eina_Bool delete_me : 1;
Eina_Bool func_array : 1;
 };
@@ -1054,16 +1057,20 @@ _eo_callbacks_clear(Efl_Object_Data *pd)
unsigned int i = 0;
 
/* If there are no deletions waiting. */
-   if (!pd->deletions_waiting) return;
+   if (!pd->need_cleaning) return;
/* Abort if we are currently walking the list. */
if (pd->event_frame) return;
 
-   pd->deletions_waiting = EINA_FALSE;
+   pd->need_cleaning = EINA_FALSE;
while (i < pd->callbacks_count)
  {
 itr = pd->callbacks + i;
 if ((*itr)->delete_me) _eo_callback_remove(pd, itr);
-else i++;
+else
+  {
+ (*itr)->generation = 0;
+ i++;
+  }
  }
 }
 
@@ -1144,6 +1151,14 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, 
Eo_Callback_Description *cb)
}
 }
 
+static unsigned char
+_efl_event_generation(Efl_Object_Data *pd)
+{
+   if (!pd->event_frame) return 0;
+
+   return ((Efl_Event_Callback_Frame*)pd->event_frame)->generation;
+}
+
 EOLIAN static Eina_Bool
 _efl_object_event_callback_priority_add(Eo *obj, Efl_Object_Data *pd,
 const Efl_Event_Description *desc,
@@ -1160,6 +1175,9 @@ _efl_object_event_callback_priority_add(Eo *obj, 
Efl_Object_Data *pd,
cb->items.item.func = func;
cb->func_data = (void *)user_data;
cb->priority = priority;
+   cb->generation = _efl_event_generation(pd);
+   if (!!cb->generation) pd->need_cleaning = EINA_TRUE;
+
_eo_callbacks_sorted_insert(pd, cb);
 #ifdef EFL_EVENT_SPECIAL_SKIP
_special_event_count_inc(pd, &(cb->items.item));
@@ -1182,7 +1200,7 @@ _efl_object_event_callback_clean(Eo *obj, Efl_Object_Data 
*pd,
 {
(*cb)->delete_me = EINA_TRUE;
if (pd->event_frame)
- pd->deletions_waiting = EINA_TRUE;
+ pd->need_cleaning = EINA_TRUE;
else
  _eo_callback_remove(pd, cb);
 
@@ -1251,6 +1269,9 @@ _efl_object_event_callback_array_priority_add(Eo *obj, 
Efl_Object_Data *pd,
cb->priority = priority;
cb->items.item_array = array;
cb->func_array = EINA_TRUE;
+   cb->generation = _efl_event_generation(pd);
+   if (!!cb->generation) pd->need_cleaning = EINA_TRUE;
+
_eo_callbacks_sorted_insert(pd, cb);
 #ifdef EFL_EVENT_SPECIAL_SKIP
for (it = cb->items.item_array; it->func; it++)
@@ -1325,7 +1346,7 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
 #endif
 
memset(&frame, 0, sizeof(Efl_Event_Callback_Frame));
-
+   frame.generation = _efl_event_generation(pd) + 1;
EVENT_STACK_PUSH(pd, &frame);
 
lookup = NULL;
@@ -1348,6 +1369,9 @@ restart_back:
 cb = pd->callbacks + idx - 1;
 if (!(*cb)->delete_me)
   {
+ if ((*cb)->generation >= frame.generation)
+   continue;
+
  if ((*cb)->func_array)
{
   const Efl_Callback_Array_Item *it;
diff --git a/src/tests/eo/suite/eo_test_event.c 
b/src/tests/eo/suite/eo_test_event.c
index f8727fa..b122801 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -60,13 +60,18 @@ START_TEST(eo_event)
efl_object_init();
Eo *obj;
 
-   memset(&data, 0, sizeof(Test_Data));
-
obj = efl_add(efl_test_event_class_get(), NULL);
efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, 
EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data);
efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TES

[EGIT] [core/efl] master 01/06: eo: add testcase to check emission of events

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit d81025a66ceab3369c3ed1a5366cb53bdcc31c97
Author: Marcel Hollerbach 
Date:   Tue Nov 29 20:18:44 2016 +0100

eo: add testcase to check emission of events
---
 src/Makefile_Eo.am |  1 +
 src/tests/eo/suite/eo_suite.c  |  1 +
 src/tests/eo/suite/eo_suite.h  |  1 +
 src/tests/eo/suite/eo_test_event.c | 98 ++
 4 files changed, 101 insertions(+)

diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am
index eefa611..0bf2453 100644
--- a/src/Makefile_Eo.am
+++ b/src/Makefile_Eo.am
@@ -143,6 +143,7 @@ tests/eo/suite/eo_test_class_behaviour_errors.c \
 tests/eo/suite/eo_test_call_errors.c \
 tests/eo/suite/eo_test_general.c \
 tests/eo/suite/eo_test_value.c \
+tests/eo/suite/eo_test_event.c \
 tests/eo/suite/eo_test_threaded_calls.c \
 tests/eo/suite/eo_test_init.c
 
diff --git a/src/tests/eo/suite/eo_suite.c b/src/tests/eo/suite/eo_suite.c
index 2a62f7b..15cf8bc 100644
--- a/src/tests/eo/suite/eo_suite.c
+++ b/src/tests/eo/suite/eo_suite.c
@@ -13,6 +13,7 @@ static const Efl_Test_Case etc[] = {
   { "Eo call errors", eo_test_call_errors },
   { "Eo eina value", eo_test_value },
   { "Eo threaded eo calls", eo_test_threaded_calls },
+  { "Eo event calls", eo_test_event},
   { NULL, NULL }
 };
 
diff --git a/src/tests/eo/suite/eo_suite.h b/src/tests/eo/suite/eo_suite.h
index ba07799..173965f 100644
--- a/src/tests/eo/suite/eo_suite.h
+++ b/src/tests/eo/suite/eo_suite.h
@@ -10,5 +10,6 @@ void eo_test_class_behaviour_errors(TCase *tc);
 void eo_test_call_errors(TCase *tc);
 void eo_test_value(TCase *tc);
 void eo_test_threaded_calls(TCase *tc);
+void eo_test_event(TCase *tc);
 
 #endif /* _EO_SUITE_H */
diff --git a/src/tests/eo/suite/eo_test_event.c 
b/src/tests/eo/suite/eo_test_event.c
new file mode 100644
index 000..f8727fa
--- /dev/null
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -0,0 +1,98 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include 
+
+#include 
+
+#include "eo_suite.h"
+#include "eo_test_class_simple.h"
+
+//Class definition with one event
+
+EWAPI const Efl_Class *efl_test_event_class_get(void);
+
+EWAPI extern const Efl_Event_Description _EFL_TEST_EVENT_EVENT_TESTER;
+
+#define EFL_TEST_EVENT_EVENT_TESTER (&(_EFL_TEST_EVENT_EVENT_TESTER))
+
+typedef struct {
+   Eina_Bool event1;
+   Eina_Bool event2;
+   Eina_Bool event3;
+} Test_Data;
+
+typedef struct {
+   int not_empty;
+} Efl_Test_Event_Data;
+
+
+static void
+_cb3(void *data, const Efl_Event *event)
+{
+   Test_Data *d = data;
+
+   d->event3 = EINA_TRUE;
+}
+
+static void
+_cb2(void *data, const Efl_Event *event)
+{
+   Test_Data *d = data;
+
+   d->event2 = EINA_TRUE;
+}
+
+static void
+_cb1(void *data, const Efl_Event *event)
+{
+   Test_Data *d = data;
+
+   d->event1 = EINA_TRUE;
+
+   efl_event_callback_add(event->object, EFL_TEST_EVENT_EVENT_TESTER, _cb3, 
data);
+}
+
+START_TEST(eo_event)
+{
+   Test_Data data;
+   efl_object_init();
+   Eo *obj;
+
+   memset(&data, 0, sizeof(Test_Data));
+
+   obj = efl_add(efl_test_event_class_get(), NULL);
+   efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, 
EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data);
+   efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, 
EFL_CALLBACK_PRIORITY_BEFORE, _cb1, &data);
+   efl_event_callback_call(obj, EFL_TEST_EVENT_EVENT_TESTER, NULL);
+
+   ck_assert_int_ne(data.event1, 0);
+   ck_assert_int_ne(data.event2, 0);
+   ck_assert_int_ne(data.event3, 0);
+
+   efl_object_shutdown();
+}
+END_TEST
+
+void eo_test_event(TCase *tc)
+{
+   tcase_add_test(tc, eo_event);
+}
+
+//class implementation
+
+EWAPI const Efl_Event_Description _EFL_TEST_EVENT_EVENT_TESTER =
+   EFL_EVENT_DESCRIPTION("tester");
+
+static const Efl_Class_Description _efl_test_event_class_desc = {
+   EO_VERSION,
+   "Efl_Test_Event",
+   EFL_CLASS_TYPE_REGULAR,
+   sizeof(Efl_Test_Event_Data),
+   NULL,
+   NULL,
+   NULL
+};
+
+EFL_DEFINE_CLASS(efl_test_event_class_get, &_efl_test_event_class_desc, 
EFL_OBJECT_CLASS, NULL);

-- 




[EGIT] [core/efl] master 04/06: eo: add new test case to check event emission while emitting

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit bf4b18ec928d897e443d27ee9a66078434b45388
Author: Marcel Hollerbach 
Date:   Thu Dec 1 20:34:46 2016 +0100

eo: add new test case to check event emission while emitting
---
 src/tests/eo/suite/eo_test_event.c | 58 --
 1 file changed, 55 insertions(+), 3 deletions(-)

diff --git a/src/tests/eo/suite/eo_test_event.c 
b/src/tests/eo/suite/eo_test_event.c
index b122801..ebbeaa8 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -27,9 +27,8 @@ typedef struct {
int not_empty;
 } Efl_Test_Event_Data;
 
-
 static void
-_cb3(void *data, const Efl_Event *event)
+_cb3(void *data, const Efl_Event *event EINA_UNUSED)
 {
Test_Data *d = data;
 
@@ -37,7 +36,7 @@ _cb3(void *data, const Efl_Event *event)
 }
 
 static void
-_cb2(void *data, const Efl_Event *event)
+_cb2(void *data, const Efl_Event *event EINA_UNUSED)
 {
Test_Data *d = data;
 
@@ -80,9 +79,62 @@ START_TEST(eo_event)
 }
 END_TEST
 
+static void
+_cb_rec_3(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Test_Data *d = event->info;
+   ck_assert_int_eq(d->event3, 0);
+   d->event3 = EINA_TRUE;
+}
+
+static void
+_cb_rec_2(void *data EINA_UNUSED, const Efl_Event *event)
+{
+   Test_Data *d = event->info;
+   ck_assert_int_eq(d->event2, 0);
+   d->event2 = EINA_TRUE;
+}
+
+static void
+_cb_rec_1(void *data, const Efl_Event *event)
+{
+   Test_Data *d = event->info;
+
+   if (event->info)
+ {
+ck_assert_int_eq(d->event1, 0);
+d->event1 = EINA_TRUE;
+ }
+   else
+ {
+efl_event_callback_add(event->object , EFL_TEST_EVENT_EVENT_TESTER, 
_cb_rec_2, NULL);
+efl_event_callback_add(event->object , EFL_TEST_EVENT_EVENT_TESTER, 
_cb_rec_3, NULL);
+efl_event_callback_call(event->object, EFL_TEST_EVENT_EVENT_TESTER, 
data);
+ }
+}
+
+START_TEST(eo_event_call_in_call)
+{
+   Test_Data data;
+   efl_object_init();
+   Eo *obj;
+
+   obj = efl_add(efl_test_event_class_get(), NULL);
+   efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, 
EFL_CALLBACK_PRIORITY_BEFORE, _cb_rec_1, &data);
+
+   memset(&data, 0, sizeof(Test_Data));
+   efl_event_callback_call(obj, EFL_TEST_EVENT_EVENT_TESTER, NULL);
+   ck_assert_int_ne(data.event1, 0);
+   ck_assert_int_ne(data.event2, 0);
+   ck_assert_int_ne(data.event3, 0);
+
+   efl_object_shutdown();
+}
+END_TEST
 void eo_test_event(TCase *tc)
 {
tcase_add_test(tc, eo_event);
+   tcase_add_test(tc, eo_event_call_in_call);
 }
 
 //class implementation

-- 




[EGIT] [core/efl] master 05/06: eo: optimize generation increase

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit a2e90e522bccdc3d724306f6a7914e582d7d1af1
Author: Marcel Hollerbach 
Date:   Fri Dec 2 11:31:45 2016 +0100

eo: optimize generation increase

doing it by hand here saves a function call which showed up pretty happy
on perf.
---
 src/lib/eo/eo_base_class.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 1bc80ba..fe8cd78 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1346,7 +1346,10 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
 #endif
 
memset(&frame, 0, sizeof(Efl_Event_Callback_Frame));
-   frame.generation = _efl_event_generation(pd) + 1;
+   frame.generation = 1;
+   if (pd->event_frame)
+ frame.generation = 
((Efl_Event_Callback_Frame*)pd->event_frame)->generation + 1;
+
EVENT_STACK_PUSH(pd, &frame);
 
lookup = NULL;

-- 




[EGIT] [core/efl] master 02/06: eo: fix event emission for subscription while emission

2016-12-02 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit a035bc1292ff8ad73e219b139d7d4c02d10b0c50
Author: Marcel Hollerbach 
Date:   Wed Nov 30 13:07:51 2016 +0100

eo: fix event emission for subscription while emission

This fixes T4907

The problem was that in efl_event_callback_add the internal array was
changed. If this was happening while a efl_event_callback_call was
happening the for loop got confused and skipped one event subscription.
Which led to a bug in e where the idler ufnction was not executed
probebly and so the canvas stayed frozen.
---
 src/lib/eo/eo_base_class.c | 40 ++--
 1 file changed, 34 insertions(+), 6 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index d937a63..f096891 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -15,6 +15,12 @@ static int event_freeze_count = 0;
 
 typedef struct _Eo_Callback_Description Eo_Callback_Description;
 
+typedef struct {
+   EINA_INLIST;
+   unsigned int idx;
+   unsigned int inserted_before;
+} Efl_Event_Callback_Frame;
+
 typedef struct
 {
const char*name;
@@ -37,7 +43,8 @@ typedef struct
Eo_Callback_Description  **callbacks;
unsigned int   callbacks_count;
 
-   unsigned short walking_list;
+   Eina_Inlist*event_frame;
+
unsigned short event_freeze_count;
 #ifdef EFL_EVENT_SPECIAL_SKIP
unsigned short event_cb_efl_event_callback_add_count;
@@ -76,6 +83,9 @@ typedef struct
unsigned int current;
 } Eo_Current_Callback_Description;
 
+#define EVENT_STACK_PUSH(pd, fr) pd->event_frame = 
eina_inlist_prepend(pd->event_frame , EINA_INLIST_GET(fr));
+#define EVENT_STACK_POP(pd) pd->event_frame = 
eina_inlist_remove(pd->event_frame, pd->event_frame);
+
 static int _eo_nostep_alloc = -1;
 
 static inline void
@@ -1046,7 +1056,7 @@ _eo_callbacks_clear(Efl_Object_Data *pd)
/* If there are no deletions waiting. */
if (!pd->deletions_waiting) return;
/* Abort if we are currently walking the list. */
-   if (pd->walking_list > 0) return;
+   if (pd->event_frame) return;
 
pd->deletions_waiting = EINA_FALSE;
while (i < pd->callbacks_count)
@@ -1121,6 +1131,17 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, 
Eo_Callback_Description *cb)
*itr = cb;
 
pd->callbacks_count++;
+
+   //update possible event emissions
+   {
+  Efl_Event_Callback_Frame *frame;
+
+  EINA_INLIST_FOREACH(pd->event_frame , frame)
+{
+   if (itr-pd->callbacks < frame->idx)
+ frame->inserted_before ++;
+}
+   }
 }
 
 EOLIAN static Eina_Bool
@@ -1160,7 +1181,7 @@ _efl_object_event_callback_clean(Eo *obj, Efl_Object_Data 
*pd,
  Eo_Callback_Description **cb)
 {
(*cb)->delete_me = EINA_TRUE;
-   if (pd->walking_list > 0)
+   if (pd->event_frame)
  pd->deletions_waiting = EINA_TRUE;
else
  _eo_callback_remove(pd, cb);
@@ -1291,6 +1312,7 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
Efl_Event ev;
unsigned int idx;
Eina_Bool callback_already_stopped, ret;
+   Efl_Event_Callback_Frame frame;
 
if (pd->callbacks_count == 0) return EINA_FALSE;
 #ifdef EFL_EVENT_SPECIAL_SKIP
@@ -1302,6 +1324,10 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
 (pd->event_cb_efl_event_del_count == 0)) return EINA_FALSE;
 #endif
 
+   memset(&frame, 0, sizeof(Efl_Event_Callback_Frame));
+
+   EVENT_STACK_PUSH(pd, &frame);
+
lookup = NULL;
callback_already_stopped = pd->callback_stopped;
ret = EINA_TRUE;
@@ -1310,8 +1336,6 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
ev.desc = desc;
ev.info = event_info;
 
-   pd->walking_list++;
-
// Handle event that require to restart where we were in the nested list 
walking
// relatively unlikely so improve l1 instr cache by using goto
if (desc->restart) goto restart;
@@ -1320,6 +1344,7 @@ restart_back:
 
for (; idx > 0; idx--)
  {
+frame.idx = idx;
 cb = pd->callbacks + idx - 1;
 if (!(*cb)->delete_me)
   {
@@ -1377,6 +1402,8 @@ restart_back:
 goto end;
}
   }
+idx += frame.inserted_before;
+frame.inserted_before = 0;
  }
 
 end:
@@ -1387,7 +1414,8 @@ end:
 pd->current = eina_inlist_remove(pd->current, EINA_INLIST_GET(lookup));
  }
 
-   pd->walking_list--;
+   EVENT_STACK_POP(pd);
+
_eo_callbacks_clear(pd);
 
pd->callback_stopped = callback_already_stopped;

-- 




[EGIT] [core/efl] master 01/01: ecore_exe_win32: fix ecore_exe_send

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 299471991c19bde387e96073ccf2bee7deaa9fcd
Author: Vyacheslav Reutskiy 
Date:   Fri Dec 2 11:48:14 2016 +0200

ecore_exe_win32: fix ecore_exe_send

Write to the child pipe corect data size.
@fix
---
 src/lib/ecore/ecore_exe_win32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 11c6f1f..7b9f41d 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -29,7 +29,7 @@
  * FIXME :
  *
  * [ ] child program with ecore main loop does not exit and nothing is sent
- * [ ] ecore_exe_send fails (race condition ? same problem as above ?)
+ * [X] ecore_exe_send fails (race condition ? same problem as above ?)
  */
 
 #define ECORE_EXE_WIN32_TIMEOUT 3000
@@ -569,7 +569,7 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
memcpy((char *)exe->pipe_write.data_buf + exe->pipe_write.data_size, data, 
size);
exe->pipe_write.data_size += size;
 
-   res = WriteFile(exe->pipe_write.child_pipe_x, buf, READBUFSIZ, &num_exe, 
NULL);
+   res = WriteFile(exe->pipe_write.child_pipe_x, buf, 
exe->pipe_write.data_size, &num_exe, NULL);
printf(" ** res : %d\n", res);
if (!res || num_exe == 0)
  {

-- 




[EGIT] [tools/eflete] master 03/06: eflete: close project on terminate

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 9850988c90c5038305f7dcfcd7ddcae1db188c8b
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 30 09:37:07 2016 +0200

eflete: close project on terminate

If user terminate eflete like Ctrl+C and efete has open project, then
given project stay locked, for avoid it, we will close project on exit
if project not close yet.

@fix

Change-Id: I7afa1d5bfd02618c9e0dabe58b9552494f0d2aa3
---
 src/bin/main.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index d8d8b1f..b100aaa 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -362,6 +362,10 @@ run:
 evas_object_show(ap.win);
 elm_run();
 exit:
+   if (ap.project)
+ if (pm_project_close(ap.project) != PM_PROJECT_SUCCESS)
+   ERR("Unable to close project");
+
 #ifdef HAVE_ENVENTOR
 enventor_shutdown();
 #endif

-- 




[EGIT] [tools/eflete] master 05/06: tab_info: fix calculate resource count

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit f7fa5a432e8a546f3a4c7d94980c56d52b20a283
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 30 10:11:41 2016 +0200

tab_info: fix calculate resource count

Resource manager already prepare resource lists (images, sounds etc) 
without internal res.

Change-Id: I8714b1534e411f17d76758faa012c19c5eadc045
---
 src/bin/ui/tab_home_info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/tab_home_info.c b/src/bin/ui/tab_home_info.c
index dd86000..501053a 100644
--- a/src/bin/ui/tab_home_info.c
+++ b/src/bin/ui/tab_home_info.c
@@ -72,8 +72,8 @@ _tab_project_update()
  {
 pm_project_meta_data_get(ap.project, NULL, &authors, &version, 
&license, &comment);
 _info_set(false, ap.project->name, ap.project->pro_path,
-  eina_list_count(ap.project->RM.images) - 1, /* dummy image 
should not be counted */
-  eina_list_count(ap.project->RM.sounds) + 
eina_list_count(ap.project->RM.tones) - 1,/* dummy sample should not be counted 
*/
+  eina_list_count(ap.project->RM.images),
+  eina_list_count(ap.project->RM.sounds) + 
eina_list_count(ap.project->RM.tones),
   eina_list_count(ap.project->RM.fonts),
   version, authors, license, comment);
  }

-- 




[EGIT] [tools/eflete] master 01/06: eflete: reorder option check for avoid skip someone

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit c56918913af0de248cbcf0f2e551f01584f2762b
Author: Vyacheslav Reutskiy 
Date:   Tue Nov 29 18:18:10 2016 +0200

eflete: reorder option check for avoid skip someone

Change-Id: Ic92b8015930a32099ebac45fb5515e050951d2ea
---
 src/bin/main.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index 6233de0..d8d8b1f 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -238,6 +238,11 @@ elm_main(int argc, char **argv)
  return -1;
   }
 
+if (export_edj)
+  {
+ if (!eina_str_has_suffix(export_edj, ".edj"))
+   _ERR_EXIT(_("--export-edj value have not extension '.edj'. 
Wrong value."));
+  }
 if (reopen)
   {
  if (file)
@@ -340,11 +345,6 @@ elm_main(int argc, char **argv)
  else if (widgets)
_ERR_EXIT(_("widgets can be added only to new project."));
   }
-if (export_edj)
-  {
- if (!eina_str_has_suffix(export_edj, ".edj"))
-   _ERR_EXIT(_("--export-edj value have not extension '.edj'. 
Wrong value."));
-  }
 
 run:
 if (export_edj)

-- 




[EGIT] [tools/eflete] master 02/06: project navigator: don't set text to entry is seleted top item

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 7bf87ffe5d878ce19ab5c2be66a2e40ef945d203
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 30 09:20:07 2016 +0200

project navigator: don't set text to entry is seleted top item

Change-Id: I1b83fa9c54b29b2ea45841439cfd796f10f1
---
 src/bin/ui/project_navigator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index 682f14d..dc89760 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -426,7 +426,7 @@ _add_group_content_get(void *data __UNUSED__, Evas_Object 
*popup, Evas_Object **
elm_layout_content_set(item, NULL, layout_p.entry);
elm_box_pack_end(layout_p.box, item);
glit = elm_genlist_selected_item_get(project_navigator.genlist);
-   if (glit && (elm_genlist_item_item_class_get(glit) == 
project_navigator.itc_folder))
+   if (glit && (glit != project_navigator.item_top) && 
(elm_genlist_item_item_class_get(glit) == project_navigator.itc_folder))
  elm_entry_entry_set(layout_p.entry, elm_object_item_data_get(glit));
/* copy: combobox */
LAYOUT_PROP_ADD(layout_p.box, _("Copy of"), "popup", "1swallow")

-- 




[EGIT] [tools/eflete] master 04/06: resource manager: don't add internal image to resource list

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit 39173893deedfd9a4796f974340fc6f6a35a7b31
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 30 10:09:32 2016 +0200

resource manager: don't add internal image to resource list

Change-Id: Ie2b9f7627ae9760227554cf68298deac08400fa8
---
 src/bin/resource_manager/resource_manager_load.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/resource_manager/resource_manager_load.c 
b/src/bin/resource_manager/resource_manager_load.c
index a8eedb9..78bd243 100644
--- a/src/bin/resource_manager/resource_manager_load.c
+++ b/src/bin/resource_manager/resource_manager_load.c
@@ -97,6 +97,8 @@ _image_resources_load(Project *project)
 /* for supporting old themes, which were compilled
  * with edje_cc version less than 1.10 */
 if (!image_name) continue;
+if (!strcmp(image_name, EFLETE_DUMMY_IMAGE_NAME))
+  continue;
 
 res = mem_calloc(1, sizeof(Image2));
 res->common.type = RESOURCE2_TYPE_IMAGE;

-- 




[EGIT] [tools/eflete] master 06/06: managers: don't check internal resource on init

2016-12-02 Thread Vyacheslav Reutskiy
rimmed pushed a commit to branch master.

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

commit f6486c5088e0167d99e7287ea9e7416beb2b03af
Author: Vyacheslav Reutskiy 
Date:   Wed Nov 30 11:52:59 2016 +0200

managers: don't check internal resource on init

Change-Id: Ie22d09cf1dab1ebdb048e62fb4f79436af5d6c72
---
 src/bin/ui/image_manager.c | 3 ---
 src/bin/ui/sound_manager.c | 1 -
 2 files changed, 4 deletions(-)

diff --git a/src/bin/ui/image_manager.c b/src/bin/ui/image_manager.c
index 1735fa2..e1eed2e 100644
--- a/src/bin/ui/image_manager.c
+++ b/src/bin/ui/image_manager.c
@@ -446,9 +446,6 @@ _image_manager_init(void)
continue;
 }
 
-  /* skip dummy image */
-  if (!strcmp(res->common.name, EFLETE_DUMMY_IMAGE_NAME)) continue;
-
   it = 
_image_manager_gengrid_item_data_create(ap.project->global_object, res);
   elm_gengrid_item_append(mng.gengrid, gic, it, _grid_sel_cb, 
NULL);
}
diff --git a/src/bin/ui/sound_manager.c b/src/bin/ui/sound_manager.c
index 7535f8f..31e73d9 100644
--- a/src/bin/ui/sound_manager.c
+++ b/src/bin/ui/sound_manager.c
@@ -168,7 +168,6 @@ _sound_manager_init(void)
elm_gengrid_item_append(mng.gengrid, ggic, snd, NULL, NULL);
EINA_LIST_FOREACH(ap.project->RM.sounds, l, sample)
  {
-if (!strcmp(sample->common.name, EFLETE_DUMMY_SAMPLE_NAME)) continue;
 snd = (Sound_Data *)mem_calloc(1, sizeof(Sound_Data));
 snd->name = eina_stringshare_ref(sample->common.name);
 snd->type_label = _sound_format_get(sample->source);

-- 




[EGIT] [core/efl] efl-1.18 01/01: wayland_egl: Fix compilation

2016-12-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch efl-1.18.

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

commit 14b3f9f45fd9e962d6b982b5a77689bd5ee28c0d
Author: Jean-Philippe Andre 
Date:   Fri Dec 2 17:38:14 2016 +0900

wayland_egl: Fix compilation

What happened??
---
 src/modules/evas/engines/wayland_egl/evas_engine.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.h 
b/src/modules/evas/engines/wayland_egl/evas_engine.h
index af83a2d..a4ccbf8 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.h
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.h
@@ -65,7 +65,6 @@ struct _Outbuf
Evas_Engine_Info_Wayland_Egl *info;
Evas_Engine_GL_Context *gl_context;
 
-   int prev_age;
Render_Engine_Swap_Mode swap_mode;
int prev_age, vsync;
int frame_cnt;

-- 




[EGIT] [core/efl] efl-1.18 01/02: evas/x11: Fix EGL engine for recent nvidia binary

2016-12-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch efl-1.18.

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

commit f3c05ef1447ae5721e911a311faa395256a764dd
Author: Jean-Philippe Andre 
Date:   Thu Dec 1 15:26:11 2016 +0900

evas/x11: Fix EGL engine for recent nvidia binary

Thank you NVIDIA for breaking your drivers regularly!
eglGetDisplay(x11_display) should work but was consistently
returning 0 instead.

Apparently EGL 1.5 introduced "eglGetPlatformDisplay" that
is more advanced to open a display. So, prefer that over
eglGetDisplay if it's available.

@fix
---
 src/modules/evas/engines/gl_x11/evas_x_main.c | 30 +--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c 
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 85f991d..7879c5e 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -149,6 +149,32 @@ _visuals_hash_index_get_from_info(Evas_Engine_Info_GL_X11 
*info)
   info->msaa_bits);
 }
 
+#ifdef GL_GLES
+
+#ifndef EGL_PLATFORM_X11_KHR
+# define EGL_PLATFORM_X11_KHR 0x31D5
+#endif
+
+static EGLDisplay *
+_x11_eglGetDisplay(Display *x11_display)
+{
+   EGLDisplay (*eglsym_eglGetPlatformDisplay)
+ (EGLenum platform, void *native_display, const EGLAttrib 
*attrib_list) = NULL;
+   EGLDisplay *egldisp = EGL_NO_DISPLAY;
+
+   eglsym_eglGetPlatformDisplay = dlsym(RTLD_DEFAULT, "eglGetPlatformDisplay");
+   if (eglsym_eglGetPlatformDisplay)
+ {
+egldisp = eglsym_eglGetPlatformDisplay(EGL_PLATFORM_X11_KHR,
+   (EGLNativeDisplayType) 
x11_display, NULL);
+if (egldisp) return egldisp;
+ }
+
+   return eglGetDisplay((EGLNativeDisplayType) x11_display);
+}
+
+#endif
+
 Outbuf *
 eng_window_new(Evas_Engine_Info_GL_X11 *info,
Evas *e,
@@ -220,7 +246,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
 // EGL / GLES
 #ifdef GL_GLES
gw->gles3 = gles3_supported;
-   gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp));
+   gw->egl_disp = _x11_eglGetDisplay(gw->disp);
if (!gw->egl_disp)
  {
 ERR("eglGetDisplay() fail. code=%#x", eglGetError());
@@ -861,7 +887,7 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
const char *eglexts, *s;
int depth = DefaultDepth(einfo->info.display, einfo->info.screen);
 
-   egl_disp = eglGetDisplay((EGLNativeDisplayType)(einfo->info.display));
+   egl_disp = _x11_eglGetDisplay(einfo->info.display);
if (!egl_disp)
  {
 free(evis);

-- 




[EGIT] [core/efl] efl-1.18 02/02: gl drm/x11: Fix compilation for EGL < 1.5

2016-12-02 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch efl-1.18.

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

commit 865d2c27001b0a26b5d1a80f42a769edd5c62f89
Author: Jean-Philippe Andre 
Date:   Fri Dec 2 14:24:57 2016 +0900

gl drm/x11: Fix compilation for EGL < 1.5

This is an attempt at fixing compilation for systems with old
EGL headers (version < 1.5).

Thanks Roy for the report!

Backported from master to avoid build breaks following the
previous @fix.
---
 src/modules/evas/engines/gl_drm/evas_engine.c | 4 
 src/modules/evas/engines/gl_x11/evas_x_main.c | 4 
 2 files changed, 8 insertions(+)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index fc7524e..fe8abfc 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -20,6 +20,10 @@
 
 #define EVAS_GL_UPDATE_TILE_SIZE 16
 
+#ifndef EGL_VERSION_1_5
+typedef intptr_t EGLAttrib;
+#endif
+
 /* external variables */
 int _evas_engine_gl_drm_log_dom = -1;
 int _extn_have_buffer_age = 1;
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c 
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 7879c5e..e8fecd5 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -155,6 +155,10 @@ _visuals_hash_index_get_from_info(Evas_Engine_Info_GL_X11 
*info)
 # define EGL_PLATFORM_X11_KHR 0x31D5
 #endif
 
+#ifndef EGL_VERSION_1_5
+typedef intptr_t EGLAttrib;
+#endif
+
 static EGLDisplay *
 _x11_eglGetDisplay(Display *x11_display)
 {

-- 




Re: [E-devel] Elm Main Menu

2016-12-02 Thread Jean-Philippe André
Hey Andy,

On 30 November 2016 at 22:54, Andrew Williams  wrote:

> I still see I here. Just updated efl and edi. It's not on every keypress
> but just using the cursor keys particularly around beeline characters seems
> to trigger it :(
>
> No idea where to start...
>

Yeah it's got to do with the changes to Main Menu. Now it's in the
framespace (is it a good or bad idea? I can find arguments for both points
of view).
And the framespace handling in X was shaky at best, it should be a bit
better now.

So the constant resizing of EDI should be fixed now.

But you'll still see issues when first opening EDI, including a massive
black border on the top-left. I know. I don't know exactly how to solve it
but it's on my TODO list.

Best regards,



>
> Andy
>
> On Wed, 30 Nov 2016 at 02:20, Jean-Philippe André 
> wrote:
>
>> On 30 November 2016 at 13:55, Jean-Philippe André 
>> wrote:
>>
>> Hi Andy,
>>
>> On 30 November 2016 at 11:35, Andrew Williams 
>> wrote:
>>
>> Hi,
>>
>> The mainmenu seems to work fine.
>> But since updating my edi window seems to shrink vertically after certain
>> key presses - any chance it's related?
>>
>>
>> Omg indeed. For me it's every key press and even just giving focus to EDI.
>>
>>
>> Not pointing fingers as I've pushed plenty in today but I didn't see it
>> until I pulled from origin I don't think.
>>
>>
>> You know it's got to be the frenchie's fault. And probably related to the
>> main menu, too.
>> I'll have a look at what's going on.
>>
>>
>> And it's magically gone before I could dive deep into this issue.
>> Please let me know if you still experience it.
>>
>>
>>
>> :)
>>
>>
>>
>> Andy
>>
>> On Tue, 29 Nov 2016 at 02:05, Jean-Philippe André 
>> wrote:
>>
>> Hey Andy,
>>
>> I've reverted my revert and tried to fix my original patch.
>> Let me know if it works fine for you!
>>
>> Thanks,
>>
>>
>> On 29 November 2016 at 02:02, Andrew Williams 
>> wrote:
>>
>> Great thanks, I love having my tab bar back :)
>>
>> Have a great day!
>> Andy
>>
>> On Mon, 28 Nov 2016 at 00:57, Jean-Philippe André 
>> wrote:
>>
>> Hi,
>>
>> On 28 November 2016 at 11:44, Carsten Haitzler 
>> wrote:
>>
>> On Sun, 27 Nov 2016 15:58:42 + Andrew Williams 
>> said:
>>
>> > Yup - that's what I see - right in elementary_test.
>> >
>> > Not started bisecting as I've not been coding for a few days. Might get
>> a
>> > chance today.
>> > But of course the efl build time is quite an issue for this :-p
>>
>> it's very likely to do with jpeg's changes tot he elm win/efl ui win and
>> theme
>> and csd etc. 
>>
>>
>> Yes, of course it was related. After playing a bit with the menu, trying
>> to place it inside the framespace, I encountered many sizing issues
>> (elm_menu and efl_ui_win both use custom layout functions). So I reverted
>> some of my changes and the menu bar is back inside win.edc. For now.
>> Hopefully I can fix the sizing issues as all the conformant features also
>> need to move inside the window.
>>
>>
>>
>> > Andrew
>> > On Sun, 27 Nov 2016 at 02:57, Carsten Haitzler 
>> wrote:
>> >
>> > > On Sun, 27 Nov 2016 07:44:25 +0200 Daniel Zaoui <
>> daniel.za...@samsung.com>
>> > > said:
>> > >
>> > > > Hi Andrew,
>> > > >
>> > > > Do you see any issues in elementary_test? Cause seems ok there. Did
>> you
>> > > try
>> > > > to bisect?
>> > > >
>> > > > Exactness doesn't cover main_menu. It should but the scenario has
>> never
>> > > been
>> > > > recorded.
>> > > >
>> > > > JackDanielZ
>> > >
>> > > elm test does show the b0rk. resize the main menu test vertically.
>> notice
>> > > the
>> > > label will slide underneath the main menu. this is the b0rk. :)
>> > >
>> > > > On Sat, 26 Nov 2016 15:20:13 +
>> > > > Andrew Williams  wrote:
>> > > >
>> > > > > Hi all,
>> > > > >
>> > > > > In the last week (or two) the elm main menu has stopped reserving
>> its
>> > > > > own space and has started overlapping content. Does anyone know
>> why
>> > > > > this might be?
>> > > > > Have the UI tests stopped being run or did the exactness not cover
>> > > > > mainmenu layout? (Again, not sure where to look)
>> > > > >
>> > > > > Thanks for any tips,
>> > > > > Andy
>> > > > >
>> > > 
>> --
>> > > > > ___
>> > > > > enlightenment-devel mailing list
>> > > > > enlightenment-devel@lists.sourceforge.net
>> > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > 
>> --
>> > > > ___
>> > > > enlightenment-devel mailing list
>> > > > enlightenment-devel@lists.sourceforge.net
>> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> > > >
>> > >
>> > >
>> > > --
>> > > - Codito, ergo sum - "I code, therefore I am"
>> --
>> > > The Rasterman (Carsten Haitzler)   

[EGIT] [core/efl] master 02/03: eo: Improve debug for efl_isa errors from threads

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

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

commit b6fae524ff6455cafcdcfd0398a34927a80171e3
Author: Jean-Philippe Andre 
Date:   Fri Dec 2 15:52:43 2016 +0900

eo: Improve debug for efl_isa errors from threads
---
 src/lib/eo/eo.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index da8f41c..48d0c29 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1465,10 +1465,11 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id)
Eo_Id_Table_Data *tdata;
Eina_Bool isa = EINA_FALSE;
 
+   if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE;
domain = ((Eo_Id)eo_id >> SHIFT_DOMAIN) & MASK_DOMAIN;
data = _eo_table_data_get();
tdata = _eo_table_data_table_get(data, domain);
-   if (!tdata) return EINA_FALSE;
+   if (EINA_UNLIKELY(!tdata)) goto err;
 
if (EINA_LIKELY(domain != EFL_ID_DOMAIN_SHARED))
  {
@@ -1532,6 +1533,16 @@ err_class:
_EO_POINTER_ERR("Class (%p) is an invalid ref.", klass_id);
 err_obj:
return EINA_FALSE;
+
+err:
+   if (!data) return EINA_FALSE;
+   ERR("Object %p is not a valid object in this context: object domain: %d, "
+   "current domain: %d, local domain: %d, available domains: [%s %s %s 
%s]",
+   eo_id, (int)domain,
+   (int)data->domain_stack[data->stack_top], (int)data->local_domain,
+   (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ",
+   (data->tables[2]) ? "2" : " ", (data->tables[3]) ? "3" : " ");
+   return EINA_FALSE;
 }
 
 EAPI Eo *

-- 




[EGIT] [core/efl] master 03/03: ecore_evas/x: Fix window size when framespace != 0

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

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

commit 348bd1160986e43aa76dd712741d8dcaa1f0c6c8
Author: Jean-Philippe Andre 
Date:   Fri Dec 2 17:01:44 2016 +0900

ecore_evas/x: Fix window size when framespace != 0

This fixes the sizing of EDI. And elm_test "States 2"

The sizes stored in ecore_evas are the "window content" sizes,
excluding the framespace which thus must be added to all calls
to ecore_x / Xlib.
---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c | 74 +
 1 file changed, 40 insertions(+), 34 deletions(-)

diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c 
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index e1eb9f7..3bafb41 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -2174,12 +2174,12 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
 {
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
Eina_Bool changed = EINA_FALSE;
-   int fw = 0, fh = 0;
+   int fw = 0, fh = 0, vw = w, vh = h;
 
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
-   if (ECORE_EVAS_PORTRAIT(ee)) SWAP_INT(fw, fh);
-   w -= fw;
-   h -= fh;
+   if (!ECORE_EVAS_PORTRAIT(ee)) SWAP_INT(fw, fh);
+   vw += fw;
+   vh += fh;
 
if ((ee->req.w != w) || (ee->req.h != h))
  {
@@ -2194,7 +2194,7 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
if (!ee->prop.window)
  {
 /* the ecore_evas was resized. we need to free the back pixmap */
-if ((edata->pixmap.w != w) || (edata->pixmap.h != h))
+if ((edata->pixmap.w != vw) || (edata->pixmap.h != vh))
   {
  /* free the backing pixmap */
  if (edata->pixmap.back) 
@@ -2210,16 +2210,16 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
 ee->w = w;
 ee->h = h;
 if (changed) edata->configure_reqs++;
-if (ee->prop.window) ecore_x_window_resize(ee->prop.window, w, h);
+if (ee->prop.window) ecore_x_window_resize(ee->prop.window, vw, vh);
 if (ECORE_EVAS_PORTRAIT(ee))
   {
- evas_output_size_set(ee->evas, ee->w, ee->h);
- evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ evas_output_size_set(ee->evas, vw, vh);
+ evas_output_viewport_set(ee->evas, 0, 0, vw, vh);
   }
 else
   {
- evas_output_size_set(ee->evas, ee->h, ee->w);
- evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ evas_output_size_set(ee->evas, vh, vw);
+ evas_output_viewport_set(ee->evas, 0, 0, vh, vw);
   }
 if (ee->prop.avoid_damage)
   {
@@ -2237,7 +2237,7 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
  {
 edata->configure_coming = 1;
 if (changed) edata->configure_reqs++;
-if (ee->prop.window) ecore_x_window_resize(ee->prop.window, w + fw, h 
+ fh);
+if (ee->prop.window) ecore_x_window_resize(ee->prop.window, vw, vh);
  }
 }
 
@@ -2246,6 +2246,13 @@ _ecore_evas_x_move_resize(Ecore_Evas *ee, int x, int y, 
int w, int h)
 {
Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data;
Eina_Bool changed = EINA_FALSE;
+   int fx = 0, fy = 0, fw = 0, fh = 0, vw = w, vh = h;
+
+   // vw,vh is viewport/output size
+   evas_output_framespace_get(ee->evas, &fx, &fy, &fw, &fh);
+   if (ECORE_EVAS_PORTRAIT(ee)) SWAP_INT(fw, fh);
+   vw += fw;
+   vh += fh;
 
if ((ee->req.x != x) || (ee->req.y != y) ||
(ee->req.w != w) || (ee->req.h != h))
@@ -2269,7 +2276,7 @@ _ecore_evas_x_move_resize(Ecore_Evas *ee, int x, int y, 
int w, int h)
   if ((x != ee->x) || (y != ee->y)) change_pos = 1;
}
  if (changed) edata->configure_reqs++;
- ecore_x_window_move_resize(ee->prop.window, x, y, w, h);
+ ecore_x_window_move_resize(ee->prop.window, x, y, vw, vh);
  if (!edata->managed)
{
   ee->x = x;
@@ -2279,13 +2286,13 @@ _ecore_evas_x_move_resize(Ecore_Evas *ee, int x, int y, 
int w, int h)
  ee->h = h;
  if (ECORE_EVAS_PORTRAIT(ee))
{
-  evas_output_size_set(ee->evas, ee->w, ee->h);
-  evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+  evas_output_size_set(ee->evas, vw, vh);
+  evas_output_viewport_set(ee->evas, 0, 0, vw, vh);
}
  else
{
-  evas_output_size_set(ee->evas, ee->h, ee->w);
-  evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+  evas_output_size_set(ee->evas, vh, vw);
+  evas_output_viewport_set(ee->evas, 0, 0, vh, vw);
}
  if (ee->prop.avoid_damage)
{
@@ -2313,7 +2320,7 @@ _

  1   2   >