[EGIT] [core/efl] master 01/01: evas_test_textblock: Fix unused variable warning

2019-01-29 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 26caf1641ff7dbfc191338bbb948a1f2ca8fde20
Author: Chris Michael 
Date:   Tue Jan 29 11:03:09 2019 -0500

evas_test_textblock: Fix unused variable warning

In evas_textblock_cursor test, the variable 'dir' is only used if
HAVE_FRIBIDI is defined. If that is not defined, then we get an unused
variable warning when compiling. This patch wraps the variable around
an #ifdef so that it does not get declared without FRIBIDI support.
---
 src/tests/evas/evas_test_textblock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index ad6d806331..776713c912 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -109,7 +109,9 @@ EFL_START_TEST(evas_textblock_cursor)
Evas_Coord x, y, w, h;
size_t i, j, len;
Evas_Coord nw, nh;
+#ifdef HAVE_FRIBIDI
Evas_BiDi_Direction dir;
+#endif
const char *buf = "This is a test.Lets see if this works.עוד 
פסקה.";
 
/* Walk the textblock using cursor_char_next */

-- 




[EGIT] [core/efl] master 01/02: elm: prevent from accessing null pointer after memory allocation

2019-01-29 Thread WooHyun Jung
zmike pushed a commit to branch master.

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

commit 7f2b26861f1454925a284724ea981709e755ede7
Author: WooHyun Jung 
Date:   Tue Jan 29 09:23:44 2019 -0500

elm: prevent from accessing null pointer after memory allocation

Summary: Add null checking code just after allocating memory

Test Plan: make check

Reviewers: jypark, Jaehyun_Cho, zmike

Reviewed By: Jaehyun_Cho, zmike

Subscribers: devilhorns, zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7801
---
 src/lib/elementary/efl_access_object.c  | 1 +
 src/lib/elementary/efl_page_transition_scroll.c | 2 ++
 src/lib/elementary/efl_ui_progressbar.c | 2 ++
 src/lib/elementary/efl_ui_table.c   | 1 +
 src/lib/elementary/efl_ui_widget.c  | 1 +
 src/lib/elementary/elm_code.c   | 1 +
 src/lib/elementary/elm_code_file.c  | 2 ++
 src/lib/elementary/elm_code_line.c  | 2 ++
 src/lib/elementary/elm_code_widget.c| 3 +++
 src/lib/elementary/elm_code_widget_text.c   | 2 ++
 src/lib/elementary/elm_code_widget_undo.c   | 1 +
 src/lib/elementary/elm_theme.c  | 1 +
 12 files changed, 19 insertions(+)

diff --git a/src/lib/elementary/efl_access_object.c 
b/src/lib/elementary/efl_access_object.c
index d477d87077..3c56eae6a5 100644
--- a/src/lib/elementary/efl_access_object.c
+++ b/src/lib/elementary/efl_access_object.c
@@ -440,6 +440,7 @@ EOLIAN Efl_Access_Event_Handler *
 _efl_access_object_event_handler_add(Eo *class EINA_UNUSED, void *pd 
EINA_UNUSED, Efl_Event_Cb cb, void *data)
 {
Efl_Access_Event_Handler *ret = calloc(1, sizeof(Efl_Access_Event_Handler));
+   if (!ret) return NULL;
 
ret->cb = cb;
ret->data = data;
diff --git a/src/lib/elementary/efl_page_transition_scroll.c 
b/src/lib/elementary/efl_page_transition_scroll.c
index fa485f18a4..169bce6c12 100644
--- a/src/lib/elementary/efl_page_transition_scroll.c
+++ b/src/lib/elementary/efl_page_transition_scroll.c
@@ -41,6 +41,7 @@ _page_info_allocate(Efl_Page_Transition_Scroll_Data *pd,
for (i = 0; i < pd->page_info_num; i++)
  {
 pi = calloc(1, sizeof(*pi));
+if (!pi) return;
 if (i == 0) pd->head = pi;
 else if (i == (pd->page_info_num - 1)) pd->tail = pi;
 pi->id = i;
@@ -462,6 +463,7 @@ _add_item(Efl_Page_Transition_Scroll_Data *pd, 
Efl_Page_Transition_Data *spd)
Page_Info *pi;
 
pi = calloc(1, sizeof(*pi));
+   if (!pi) return NULL;
pi->obj = efl_add(EFL_UI_BOX_CLASS, spd->pager.obj);
efl_canvas_group_member_add(spd->pager.group, pi->obj);
pi->content_num = -1;
diff --git a/src/lib/elementary/efl_ui_progressbar.c 
b/src/lib/elementary/efl_ui_progressbar.c
index f363e0d02f..ccaaf7e8ed 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -48,6 +48,7 @@ _progress_status_new(const char *part_name, double val)
 {
Efl_Ui_Progress_Status *ps;
ps = calloc(1, sizeof(Efl_Ui_Progress_Status));
+   if (!ps) return NULL;
ps->part_name = eina_stringshare_add(part_name);
ps->val = val;
return ps;
@@ -998,6 +999,7 @@ elm_progressbar_unit_format_function_set(Evas_Object *obj, 
progressbar_func_type
 {
EFL_UI_PROGRESSBAR_DATA_GET_OR_RETURN(obj, sd);
Pb_Format_Wrapper_Data *pfwd = malloc(sizeof(Pb_Format_Wrapper_Data));
+   if (!pfwd) return;
 
pfwd->format_cb = func;
pfwd->format_free_cb = free_func;
diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index 5e7ccbda98..3e5a14d401 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -291,6 +291,7 @@ _pack_at(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity 
*subobj,
if (!gi)
  {
 gi = calloc(1, sizeof(*gi));
+if (!gi) return EINA_FALSE;
 gi->col = col;
 gi->row = row;
 gi->col_span = colspan;
diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index 30f1ba3c4a..065bc3577f 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -5825,6 +5825,7 @@ _widget_shadow_part_get(const Eo *part_obj)
if (!shadow)
  {
 shadow = calloc(1, sizeof(*shadow));
+if (!shadow) return NULL;
 shadow->widget = pd->obj;
 efl_key_data_set(widget, "__elm_shadow", shadow);
 efl_event_callback_array_add(widget, widget_shadow_cb(), shadow);
diff --git a/src/lib/elementary/elm_code.c b/src/lib/elementary/elm_code.c
index cfe1f7edf3..12c1e4e9b6 100644
--- a/src/lib/elementary/elm_code.c
+++ b/src/lib/elementary/elm_code.c
@@ -21,6 +21,7 @@ elm_code_create(void)
Elm_Code *ret;
 
ret = calloc(1, sizeof(Elm_Code));
+   if (!ret) return NULL;
ret->config.indent_style_efl = EINA_TRUE;
 
// 

[EGIT] [core/efl] master 02/02: elementary: enable efl_ui_suite tests for meson build.

2019-01-29 Thread Cedric BAIL
zmike pushed a commit to branch master.

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

commit 97e210d727e55fd3290cb16f5e9defea0f6ee70e
Author: Cedric BAIL 
Date:   Tue Jan 29 09:26:51 2019 -0500

elementary: enable efl_ui_suite tests for meson build.

Summary: Depends on D7661

Reviewers: SanghyeonLee, felipealmeida, segfaultxavi, zmike

Reviewed By: SanghyeonLee, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7382

Differential Revision: https://phab.enlightenment.org/D7662
---
 src/tests/elementary/efl_ui_suite.c |  2 +-
 src/tests/elementary/meson.build| 19 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/tests/elementary/efl_ui_suite.c 
b/src/tests/elementary/efl_ui_suite.c
index 0ba2542c73..c5c39bd143 100644
--- a/src/tests/elementary/efl_ui_suite.c
+++ b/src/tests/elementary/efl_ui_suite.c
@@ -12,7 +12,6 @@ efl_main(void *data EINA_UNUSED,
 {
Efl_Loop_Arguments *arge = ev->info;
 
-   
fail_if(!arge->initialization);
fprintf(stderr, "ARGC %d\n", eina_array_count(arge->argv));
fail_if(eina_array_count(arge->argv) != 2);
@@ -37,6 +36,7 @@ EFL_START_TEST(efl_ui_test_init)
__EFL_MAIN_CONSTRUCTOR;
ret__ = efl_loop_begin(efl_app_main_get(EFL_APP_CLASS));
real__ = efl_loop_exit_code_process(ret__);
+   fail_if(real__ != 0);
__EFL_MAIN_DESTRUCTOR;
ecore_shutdown_ex();
ecore_shutdown();
diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build
index 823e93e1cf..b8c030b128 100644
--- a/src/tests/elementary/meson.build
+++ b/src/tests/elementary/meson.build
@@ -116,10 +116,29 @@ elementary_suite = executable('elementary_suite',
   ]
 )
 
+efl_ui_suite_src = [
+  'efl_ui_suite.c',
+]
+
+efl_ui_suite = executable('efl_ui_suite',
+  efl_ui_suite_src, priv_eo_file_target,
+  dependencies: [check, eina, elementary, elementary_deps],
+  include_directories : [config_dir] + [elementary_config_dir],
+  c_args : [
+  '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
+  '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
+  '-DELM_IMAGE_DATA_DIR="'+join_paths(meson.source_root(), 'data', 
'elementary')+'"',
+  '-DELM_TEST_DATA_DIR="'+join_paths(meson.build_root(), 'data', 
'elementary')+'"',
+  ]
+)
+
 test('elementary-suite', elementary_suite,
   env : test_env
 )
 
+test('efl-ui-suite', efl_ui_suite,
+  env : test_env
+)
 
 install_data(files(['testdiff.diff', 'testfile-windows.txt', 
'testfile-withblanks.txt', 'testfile.txt']),
   install_dir : join_paths(dir_data, 'elementary')

-- 




[EGIT] [core/efl] master 01/01: efl_ui_grid: Fix return value from macros

2019-01-29 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit c69b340f25e04e0879333cf195eda2a5ea95008d
Author: Christopher Michael 
Date:   Tue Jan 29 08:43:57 2019 -0500

efl_ui_grid: Fix return value from macros

The function _grid_item_unpack_internal does not return a value, so
these macros should not be trying to return EINA_FALSE.
---
 src/lib/elementary/efl_ui_grid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index 08ce47d812..0b2453c08f 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -956,8 +956,8 @@ static void
 _grid_item_unpack_internal(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Grid_Item *it)
 {
EFL_UI_GRID_ITEM_CHECK_OR_RETURN(it);
-   EFL_UI_GRID_ITEM_DATA_GET_OR_RETURN(it, gd, EINA_FALSE);
-   EFL_UI_ITEM_DATA_GET_OR_RETURN(it, id, EINA_FALSE);
+   EFL_UI_GRID_ITEM_DATA_GET_OR_RETURN(it, gd);
+   EFL_UI_ITEM_DATA_GET_OR_RETURN(it, id);
id->select_mode = NULL;
id->parent = NULL;
gd->parent = NULL;

-- 




[EGIT] [core/efl] master 01/01: ecore_wl2_input: update a timestamp whenever possible

2019-01-29 Thread Wonki Kim
devilhorns pushed a commit to branch master.

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

commit 3bedc63315d8ff32e8db7dc99697d6c1bbf8a79d
Author: Wonki Kim 
Date:   Tue Jan 29 07:06:33 2019 -0500

ecore_wl2_input: update a timestamp whenever possible

Summary:
gettimeofday function returns a accumulated timestamp since around 1970 by 
the way,
a argument from server looks like a system uptime based timestamp
in some distribution such as tizen.

so that this patch appends a logic that updates a timestamp
inside Ecore_Wl2_Input* whenever possible to
prevent gettimeofday function from being called.

Reviewers: #reviewers, cedric, devilhorns

Reviewed By: #reviewers, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7766
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 721f6a10ee..0d480f50e8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -765,6 +765,7 @@ _pointer_cb_button(void *data, struct wl_pointer *pointer 
EINA_UNUSED, unsigned
if (!input) return;
 
input->display->serial = serial;
+   input->timestamp = timestamp;
 
if (state == WL_POINTER_BUTTON_STATE_PRESSED)
  {
@@ -802,6 +803,8 @@ _pointer_cb_axis(void *data, struct wl_pointer *pointer 
EINA_UNUSED, unsigned in
input = data;
if (!input) return;
 
+   input->timestamp = timestamp;
+
_ecore_wl2_input_mouse_wheel_send(input, axis, wl_fixed_to_int(value),
  timestamp);
 }
@@ -1056,6 +1059,7 @@ _keyboard_cb_key(void *data, struct wl_keyboard *keyboard 
EINA_UNUSED, unsigned
if (!window) return;
 
input->display->serial = serial;
+   input->timestamp = timestamp;
 
/* xkb rules reflect X broken keycodes, so offset by 8 */
code = keycode + 8;
@@ -1205,6 +1209,7 @@ _touch_cb_down(void *data, struct wl_touch *touch 
EINA_UNUSED, unsigned int seri
if (!window) return;
 
input->focus.touch = window;
+   input->timestamp = timestamp;
 
_pointer_cb_enter(data, NULL, serial, surface, x, y);
 

-- 




[EGIT] [core/efl] master 01/01: eina modinfo: improve eina modinfo guide.

2019-01-29 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit a016f8e592d8e1fed68e231cda62313e9ac178a7
Author: Amitesh Singh 
Date:   Tue Jan 29 16:58:25 2019 +0530

eina modinfo: improve eina modinfo guide.
---
 src/lib/eina/eina_inline_modinfo.x | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_inline_modinfo.x 
b/src/lib/eina/eina_inline_modinfo.x
index 7c931dab27..582b7caf5a 100644
--- a/src/lib/eina/eina_inline_modinfo.x
+++ b/src/lib/eina/eina_inline_modinfo.x
@@ -32,7 +32,8 @@ __attribute__((__used__)) __attribute__((unused, aligned(1))) 
= info;
   * @defgroup Eina_Module_Group Module
   *  
   * These macros allow you to define module informations like 
author/description/version/license.
-  * eina_modinfo can show these informations to users
+  * eina_modinfo - shows information about an eina module.
+  * eina_modinfo pulls out information from the eina modules given on command 
line.
   *
   * $ eina_modinfo module.so
   * version: 0.1

-- 




[EGIT] [core/enlightenment] master 02/03: pager - fix dragged win offset to be correct, not top left

2019-01-29 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 6d0ea318706fe2b3a5a2e5e86190650588d3664b
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Jan 28 14:34:21 2019 +

pager - fix dragged win offset to be correct, not top left

when you dnd'd a window around it just always jumped to an odd
position. now it drops where you drop it.

@fix
---
 src/modules/pager/e_mod_main.c   | 50 +++-
 src/modules/pager/gadget/pager.c | 43 +-
 2 files changed, 56 insertions(+), 37 deletions(-)

diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 5690237ea..0478b1fce 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -755,7 +755,7 @@ _pager_popup_new(E_Zone *zone, int keyaction)
/* Show popup */
 
pp->pager = _pager_new(e_comp->evas, zone, NULL);
-   
+
pp->pager->popup = pp;
pp->urgent = 0;
 
@@ -1329,10 +1329,11 @@ _pager_update_drop_position(Pager *p, Evas_Coord x, 
Evas_Coord y)
if (!pw) return;
if (pd)
  {
-int zx, zy, zw, zh, vx, vy;
+int zx, zy, zw, zh, vx, vy, offx, offy;
 E_Client *ec = pw->client;
 E_Desk *old_desk = ec->desk;
 Eina_Bool was_focused = e_client_stack_focused_get(ec);
+E_Drag *drag = e_drag_current_get();
 
 pw->drag.in_pager = 1;
 //makes drags look weird
@@ -1340,12 +1341,18 @@ _pager_update_drop_position(Pager *p, Evas_Coord x, 
Evas_Coord y)
 zx = pd->desk->zone->x, zy = pd->desk->zone->y;
 zw = pd->desk->zone->w, zh = pd->desk->zone->h;
 e_deskmirror_coord_canvas_to_virtual(pd->o_layout,
- x + pw->drag.dx,
- y + pw->drag.dy, , );
+ x, y, , );
 ec->hidden = !pd->desk->visible;
 e_client_desk_set(ec, pd->desk);
-x = E_CLAMP(vx + zx, zx, zx + zw - ec->w);
-y = E_CLAMP(vy + zy, zy, zy + zh - ec->h);
+offx = (ec->w / 2);
+offy = (ec->h / 2);
+if (drag)
+  {
+ if (drag->w > 0) offx = ((drag->dx) * ec->w) / drag->w;
+ if (drag->h > 0) offy = ((drag->dy) * ec->h) / drag->h;
+  }
+x = E_CLAMP(vx + zx - offx, zx, zx + zw - ec->w);
+y = E_CLAMP(vy + zy - offy, zy, zy + zh - ec->h);
 evas_object_move(ec->frame, x, y);
 if (was_focused)
   e_desk_last_focused_focus(old_desk);
@@ -1414,7 +1421,6 @@ _pager_drop_cb_drop(void *data, const char *type, void 
*event_info)
Pager_Desk *pd2 = NULL;
E_Client *ec = NULL;
Eina_List *l;
-   int dx = 0, dy = 0;
Pager_Win *pw = NULL;
Evas_Coord wx, wy, wx2, wy2;
Evas_Coord nx, ny;
@@ -1434,19 +1440,15 @@ _pager_drop_cb_drop(void *data, const char *type, void 
*event_info)
  if (pw)
{
   ec = pw->client;
-  dx = pw->drag.dx;
-  dy = pw->drag.dy;
}
   }
 else if (!strcmp(type, "enlightenment/border"))
   {
  ec = ev->data;
  e_deskmirror_coord_virtual_to_canvas(pd->o_layout, ec->x, ec->y,
-  , );
+  , );
  e_deskmirror_coord_virtual_to_canvas(pd->o_layout, ec->x + ec->w,
-  ec->y + ec->h, , );
- dx = (wx - wx2) / 2;
- dy = (wy - wy2) / 2;
+  ec->y + ec->h, , );
   }
 else if (!strcmp(type, "enlightenment/vdesktop"))
   {
@@ -1477,17 +1479,23 @@ _pager_drop_cb_drop(void *data, const char *type, void 
*event_info)
 
  if ((!max) && (!fullscreen))
{
-  int zx, zy, zw, zh, mx, my;
+  E_Drag *drag = e_drag_current_get();
+  int zx, zy, zw, zh, mx, my, offx, offy;
 
   e_deskmirror_coord_canvas_to_virtual(pd->o_layout,
-   ev->x + dx,
-   ev->y + dy,
-   , );
+   ev->x, ev->y,
+   , );
   e_zone_useful_geometry_get(pd->desk->zone,
  , , , );
-
-  mx = E_CLAMP(nx + zx, zx, zx + zw - ec->w);
-  my = E_CLAMP(ny + zy, zy, zy + zh - ec->h);
+  offx = (ec->w / 2);
+  offy = (ec->h / 2);
+  if (drag)
+{
+   if (drag->w > 0) offx = ((drag->dx) * ec->w) / 

[EGIT] [core/enlightenment] master 01/03: pager - fix small issue - raise window on drag start

2019-01-29 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 9f664bc7850910a41bdad76783800982c7df57e8
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Jan 28 12:13:07 2019 +

pager - fix small issue - raise window on drag start

visually when u start to drag a window in pager it raises because of
dnd... so raise the real window too so they match. it looked weird
otherwise.

@fix
---
 src/modules/pager/e_mod_main.c   | 1 +
 src/modules/pager/gadget/pager.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 710ec77e4..5690237ea 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -1191,6 +1191,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EI
  _pager_window_cb_drag_finished);
drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
 
+   evas_object_raise(pw->client->frame);
/* this is independent of the original mirror */
o = e_deskmirror_mirror_copy(pw->o_mirror);
evas_object_show(o);
diff --git a/src/modules/pager/gadget/pager.c b/src/modules/pager/gadget/pager.c
index a5df14ff5..3bafa386a 100644
--- a/src/modules/pager/gadget/pager.c
+++ b/src/modules/pager/gadget/pager.c
@@ -2076,6 +2076,7 @@ _pager_window_cb_mouse_move(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EI
  _pager_window_cb_drag_convert,
  _pager_window_cb_drag_finished);
drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
+   evas_object_raise(pw->client->frame);
if ((pw->desk->pager->plain) || (pager_config->permanent_plain))
  {
 o = edje_object_add(drag->evas);

-- 




[EGIT] [core/enlightenment] master 03/03: pager - fix vanishing windows when dnd from desk to desk in pager

2019-01-29 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 6bdcf9256395905d893e2b1594b047620e0a99cb
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Jan 28 17:41:02 2019 +

pager - fix vanishing windows when dnd from desk to desk in pager

windows would vanish at times (eg dnd into an empty desktop in the
pager). this was pretty disconcerting and a problem, so this fixes it
with a bit of a sledgehammer, but it fixes it.

@fix
---
 src/bin/e_deskmirror.c   | 37 ++---
 src/bin/e_deskmirror.h   |  1 +
 src/modules/pager/e_mod_main.c   |  5 +
 src/modules/pager/gadget/pager.c |  5 +
 4 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/src/bin/e_deskmirror.c b/src/bin/e_deskmirror.c
index 43f0c95d1..71e77fc2e 100644
--- a/src/bin/e_deskmirror.c
+++ b/src/bin/e_deskmirror.c
@@ -31,6 +31,7 @@ typedef struct E_Smart_Data
Eina_Bool taskbar E_BITFIELD;
 
Eina_Bool resize E_BITFIELD;
+   Eina_Bool force E_BITFIELD;
 } E_Smart_Data;
 
 typedef struct Mirror
@@ -95,9 +96,13 @@ static void
 _mirror_visible_apply(Mirror *m)
 {
if (_e_deskmirror_visible_get(m->sd, m))
- evas_object_show(m->mirror);
+ {
+evas_object_show(m->mirror);
+ }
else
- evas_object_hide(m->mirror);
+ {
+evas_object_hide(m->mirror);
+ }
 }
 
 static void
@@ -509,11 +514,14 @@ static void
 _e_deskmirror_mirror_reconfigure(Mirror *m)
 {
_e_deskmirror_mirror_geometry_get(m);
-   e_layout_child_move(m->mirror, m->x, m->y);
-   e_layout_child_resize(m->mirror, m->w, m->h);
-   /* assume that anything happening here is the result of a drag */
-   if (!e_drag_current_get())
- _mirror_visible_apply(m);
+   if (m->mirror)
+ {
+e_layout_child_move(m->mirror, m->x, m->y);
+e_layout_child_resize(m->mirror, m->w, m->h);
+/* assume that anything happening here is the result of a drag */
+if (((!m->sd->force) && (!e_drag_current_get())) || (m->sd->force))
+  _mirror_visible_apply(m);
+ }
 }
 
 static void
@@ -771,6 +779,7 @@ _client_desk_set(E_Smart_Data *sd, int type EINA_UNUSED, 
E_Event_Client_Desk_Set
 /* ev->desk is previous desk */
 if (!e_client_util_desk_visible(ev->ec, sd->desk))
   eina_hash_del_by_key(sd->mirror_hash, >ec->frame);
+_mirror_visible_apply(m);
  }
if ((!m) && (sd->desk == ev->ec->desk))
  _e_deskmirror_mirror_add(sd, ev->ec->frame);
@@ -976,3 +985,17 @@ e_deskmirror_util_wins_print(Evas_Object *obj)
   fprintf(stderr, "MIRROR OBJ: %p\n", m->comp_object);
  }
 }
+
+E_API void
+e_deskmirror_update_force(Evas_Object *obj)
+{
+   API_ENTRY(obj);
+
+   e_layout_freeze(sd->layout);
+   sd->force = EINA_TRUE;
+   _e_deskmirror_smart_hide(obj);
+   _e_deskmirror_smart_reconfigure(sd);
+   _e_deskmirror_smart_show(obj);
+   sd->force = EINA_FALSE;
+   e_layout_thaw(sd->layout);
+}
diff --git a/src/bin/e_deskmirror.h b/src/bin/e_deskmirror.h
index a9a137b45..919d68edf 100644
--- a/src/bin/e_deskmirror.h
+++ b/src/bin/e_deskmirror.h
@@ -9,6 +9,7 @@ E_API void e_deskmirror_coord_canvas_to_virtual(Evas_Object 
*obj, Evas_Coord cx,
 E_API void e_deskmirror_coord_virtual_to_canvas(Evas_Object *obj, Evas_Coord 
vx, Evas_Coord vy, Evas_Coord *cx, Evas_Coord *cy);
 E_API E_Desk *e_deskmirror_desk_get(Evas_Object *obj);
 E_API void e_deskmirror_util_wins_print(Evas_Object *obj);
+E_API void e_deskmirror_update_force(Evas_Object *obj);
 //#define DESKMIRROR_TEST
 
 #endif
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 0478b1fce..a3f00d28b 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -603,6 +603,8 @@ _pager_desk_switch(Pager_Desk *pd1, Pager_Desk *pd2)
 pw->client->hidden = 0;
 e_client_desk_set(pw->client, desk1);
  }
+   e_deskmirror_update_force(pd1->o_layout);
+   e_deskmirror_update_force(pd2->o_layout);
 
/* Modify desktop names in the config */
for (l = e_config->desktop_names, c = 0; l && c < 2; l = l->next)
@@ -1230,6 +1232,7 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
 /* be helpful */
 if (pw->client->desk->visible && (!e_client_focused_get()))
   evas_object_focus_set(pw->client->frame, 1);
+e_deskmirror_update_force(pw->desk->o_layout);
  }
else
  {
@@ -1265,6 +1268,7 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
 
 if (!(ec->lock_user_stacking)) evas_object_raise(ec->frame);
 evas_object_focus_set(ec->frame, 1);
+e_deskmirror_update_force(pw->desk->o_layout);
  }
if (p->active_drop_pd)
  {
@@ -1500,6 +1504,7 @@ _pager_drop_cb_drop(void *data, const char *type, void 
*event_info)
}
  if (max) e_client_maximize(ec, max);
  if (fullscreen) 

[EGIT] [core/efl] master 01/01: efl gfx_frame_controller: improve doc.

2019-01-29 Thread Hermet Park
hermet pushed a commit to branch master.

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

commit 2554a2940a0c99d08ff292098ed81038c6feb34b
Author: Hermet Park 
Date:   Tue Jan 29 19:56:03 2019 +0900

efl gfx_frame_controller: improve doc.
---
 src/lib/efl/interfaces/efl_gfx_frame_controller.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo 
b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
index dcb54f6eea..f08026f2b4 100644
--- a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
+++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
@@ -18,7 +18,7 @@ interface Efl.Gfx.Frame_Controller
 [[Check if an object can be animated (has multiple frames).
 
   This will be $true for animated object for instance but $false
-  for still image.
+  for a single frame object.
 
   @since 1.1
 ]]

-- 




[EGIT] [core/efl] master 01/01: ecore: check fcntl return.

2019-01-29 Thread Hosang Kim
jaehyun pushed a commit to branch master.

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

commit 58c9f5688530fc109b649b54fecfc802ded04522
Author: Hosang Kim 
Date:   Tue Jan 29 19:30:45 2019 +0900

ecore: check fcntl return.

Summary: Found by svace

Reviewers: Jaehyun_Cho, woohyun, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7808
---
 src/lib/ecore/ecore_signal.c |  4 +++-
 src/lib/ecore/efl_thread.c   | 24 
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c
index f970842d31..1138c7be53 100644
--- a/src/lib/ecore/ecore_signal.c
+++ b/src/lib/ecore/ecore_signal.c
@@ -247,7 +247,9 @@ _ecore_signal_pipe_init(void)
   }
 eina_file_close_on_exec(sig_pipe[0], EINA_TRUE);
 eina_file_close_on_exec(sig_pipe[1], EINA_TRUE);
-fcntl(sig_pipe[0], F_SETFL, O_NONBLOCK);
+if (fcntl(sig_pipe[0], F_SETFL, O_NONBLOCK) < 0)
+  ERR("can't set pipe to NONBLOCK");
+
  }
_signalhandler_setup();
if (!sig_pipe_handler)
diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c
index 8e4cd978fb..4d48296093 100644
--- a/src/lib/ecore/efl_thread.c
+++ b/src/lib/ecore/efl_thread.c
@@ -618,8 +618,10 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
 pd->fd.out= pipe_from_thread[0]; // read - output from child
 eina_file_close_on_exec(thdat->fd.in, EINA_TRUE);
 eina_file_close_on_exec(pd->fd.out, EINA_TRUE);
-fcntl(thdat->fd.in, F_SETFL, O_NONBLOCK);
-fcntl(pd->fd.out, F_SETFL, O_NONBLOCK);
+if (fcntl(thdat->fd.in, F_SETFL, O_NONBLOCK) < 0)
+  ERR("can't set pipe to NONBLOCK");
+if (fcntl(pd->fd.out, F_SETFL, O_NONBLOCK) < 0)
+  ERR("can't set pipe to NONBLOCK");
 pd->fd.out_handler =
   efl_add(EFL_LOOP_HANDLER_CLASS, obj,
   efl_loop_handler_fd_set(efl_added, pd->fd.out),
@@ -634,8 +636,10 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
 thdat->fd.out = pipe_to_thread  [0]; // read - output from parent
 eina_file_close_on_exec(pd->fd.in, EINA_TRUE);
 eina_file_close_on_exec(thdat->fd.out, EINA_TRUE);
-fcntl(thdat->fd.out, F_SETFL, O_NONBLOCK);
-fcntl(pd->fd.in, F_SETFL, O_NONBLOCK);
+if (fcntl(thdat->fd.out, F_SETFL, O_NONBLOCK) < 0)
+  ERR("can't set pipe to NONBLOCK");
+if (fcntl(pd->fd.in, F_SETFL, O_NONBLOCK) < 0)
+  ERR("can't set pipe to NONBLOCK");
 pd->fd.in_handler =
   efl_add(EFL_LOOP_HANDLER_CLASS, obj,
   efl_loop_handler_fd_set(efl_added, pd->fd.in),
@@ -682,10 +686,14 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
thdat->ctrl.out = pipe_to_thread  [0]; // read - output from parent
pd->ctrl.in = pipe_to_thread  [1]; // write - input to child
pd->ctrl.out= pipe_from_thread[0]; // read - output from child
-   fcntl(thdat->ctrl.in, F_SETFL, O_NONBLOCK);
-   fcntl(thdat->ctrl.out, F_SETFL, O_NONBLOCK);
-   fcntl(pd->ctrl.in, F_SETFL, O_NONBLOCK);
-   fcntl(pd->ctrl.out, F_SETFL, O_NONBLOCK);
+   if (fcntl(thdat->ctrl.in, F_SETFL, O_NONBLOCK) < 0)
+ ERR("can't set pipe to NONBLOCK");
+   if (fcntl(thdat->ctrl.out, F_SETFL, O_NONBLOCK) < 0)
+ ERR("can't set pipe to NONBLOCK");
+   if (fcntl(pd->ctrl.in, F_SETFL, O_NONBLOCK) < 0)
+ ERR("can't set pipe to NONBLOCK");
+   if (fcntl(pd->ctrl.out, F_SETFL, O_NONBLOCK) < 0)
+ ERR("can't set pipe to NONBLOCK");
eina_file_close_on_exec(pd->ctrl.in, EINA_TRUE);
eina_file_close_on_exec(pd->ctrl.out, EINA_TRUE);
eina_file_close_on_exec(thdat->ctrl.in, EINA_TRUE);

-- 




[EGIT] [core/efl] master 01/01: efl_gfx_image_animation_controller: Rename '*.Image_Animation_*' to '*.Frame_*'

2019-01-29 Thread JunsuChoi
hermet pushed a commit to branch master.

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

commit 09ce84bbadc3fb21311e5dbff7c09d74a2ef4d55
Author: JunsuChoi 
Date:   Tue Jan 29 19:16:34 2019 +0900

efl_gfx_image_animation_controller: Rename '*.Image_Animation_*' to 
'*.Frame_*'

Summary:
Efl.Gfx.Image_Animation_Controller name refers to the control of an 
animatable image.
However, the method we use is closer to controlling the frame.
We can change the name to Efl.Gfx.Frame_Controller and enhance the 
functionality of the frame control.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: segfaultxavi, cedric, woohyun, #reviewers, Jaehyun_Cho, 
#committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7769
---
 src/Makefile_Efl.am|  2 +-
 src/lib/efl/Efl.h  |  4 +-
 ...n_controller.eo => efl_gfx_frame_controller.eo} | 57 ++
 src/lib/efl/interfaces/efl_interfaces_main.c   |  2 +-
 src/lib/efl/interfaces/meson.build |  2 +-
 src/lib/evas/canvas/efl_canvas_image.c | 22 -
 src/lib/evas/canvas/efl_canvas_image.eo| 14 +++---
 src/lib/evas/canvas/evas_image_private.h   |  2 +-
 8 files changed, 51 insertions(+), 54 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 2d65f20a46..ada411a1d5 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -4,7 +4,7 @@ efl_eolian_legacy_files = \
lib/efl/interfaces/efl_gfx_entity.eo \
lib/efl/interfaces/efl_gfx_color.eo \
lib/efl/interfaces/efl_gfx_image.eo \
-   lib/efl/interfaces/efl_gfx_image_animation_controller.eo \
+   lib/efl/interfaces/efl_gfx_frame_controller.eo \
lib/efl/interfaces/efl_input_device.eo \
 lib/efl/interfaces/efl_ui_draggable.eo \
 lib/efl/interfaces/efl_ui_clickable.eo \
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 46bd09b4ee..f4c79916ab 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -86,7 +86,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
 #include "interfaces/efl_duplicate.eo.h"
 #include "interfaces/efl_file.eo.h"
 #include "interfaces/efl_gfx_image.eo.h"
-#include "interfaces/efl_gfx_image_animation_controller.eo.h"
+#include "interfaces/efl_gfx_frame_controller.eo.h"
 #include "interfaces/efl_gfx_image_load_controller.eo.h"
 #include "interfaces/efl_part.eo.h"
 #include "interfaces/efl_playable.eo.h"
@@ -227,7 +227,7 @@ EAPI Eina_Future 
*efl_ui_view_factory_create_with_event(Efl_Ui_Factory *factory,
 #include "interfaces/efl_gfx_fill.eo.legacy.h"
 #include "interfaces/efl_gfx_entity.eo.legacy.h"
 #include "interfaces/efl_gfx_image.eo.legacy.h"
-#include "interfaces/efl_gfx_image_animation_controller.eo.legacy.h"
+#include "interfaces/efl_gfx_frame_controller.eo.legacy.h"
 #include "interfaces/efl_input_device.eo.legacy.h"
 #include "interfaces/efl_text_types.eot.h"
 #endif
diff --git a/src/lib/efl/interfaces/efl_gfx_image_animation_controller.eo 
b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
similarity index 58%
rename from src/lib/efl/interfaces/efl_gfx_image_animation_controller.eo
rename to src/lib/efl/interfaces/efl_gfx_frame_controller.eo
index ef11fe6d4d..dcb54f6eea 100644
--- a/src/lib/efl/interfaces/efl_gfx_image_animation_controller.eo
+++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
@@ -1,42 +1,39 @@
 /* FIXME: invalid type from evas/emile! */
 /* type @extern Evas.Animated_Loop_Hint: int; */
 
-enum Efl.Gfx.Image_Animation_Controller_Loop_Hint {
-   [[Image animation loop modes]]
+enum Efl.Gfx.Frame_Controller_Loop_Hint {
+   [[Frame loop modes]]
none = 0,   [[No looping order specified.]]
loop = 1,   [[Standard loop: 1->2->3->1->2->3->1]]
pingpong = 2[[Ping-pong bouncing loop: 1->2->3->2->1->2->3->1]]
 }
 
-/* FIXME: rename to Efl.Gfx.Image_Animation_Controller when eo/eolian are 
fixed */
-
-interface Efl.Gfx.Image_Animation_Controller
+interface Efl.Gfx.Frame_Controller
 {
-   [[Efl animated image interface]]
-   eo_prefix: efl_gfx_image;
+   [[Efl frame controller of frame based animated object interface.]]
 
methods {
   @property animated {
  get {
-[[Check if an image can be animated (has multiple frames).
+[[Check if an object can be animated (has multiple frames).
 
-  This will be $true for animated Gif files for instance but $false
-  for still images.
+  This will be $true for animated object for instance but $false
+  for still image.
 
   @since 1.1
 ]]
  }
  values {
-is_animated: bool; [[$true if the image is animated]]
+is_animated: bool; [[$true if the object is animated]]
  }
   }
-  @property 

[EGIT] [core/efl] master 01/01: efl_gfx_map: free alloc' memory at exception case.

2019-01-29 Thread Hermet Park
hermet pushed a commit to branch master.

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

commit 391339332ff91f6a304e87be4a23421d895866f2
Author: Hermet Park 
Date:   Tue Jan 29 18:36:09 2019 +0900

efl_gfx_map: free alloc' memory at exception case.
---
 src/lib/evas/canvas/efl_gfx_map.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/efl_gfx_map.c 
b/src/lib/evas/canvas/efl_gfx_map.c
index c4a2cea395..a63b62ed03 100644
--- a/src/lib/evas/canvas/efl_gfx_map.c
+++ b/src/lib/evas/canvas/efl_gfx_map.c
@@ -252,6 +252,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data 
*obj, Efl_Gfx_Map_Data *p
Evas_Map *m;
int imw, imh;
int count;
+   Eina_Bool map_alloc = EINA_FALSE;
 
if (pd->cow == _map_cow_default)
  return NULL;
@@ -302,7 +303,11 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data 
*obj, Efl_Gfx_Map_Data *p
  }
else
  {
-if (!m) m = evas_map_new(count);
+if (!m)
+  {
+ m = evas_map_new(count);
+ map_alloc = EINA_TRUE;
+  }
 else _evas_map_reset(m);
 m->alpha = pd->cow->alpha;
 m->smooth = pd->cow->smooth;
@@ -357,7 +362,13 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data 
*obj, Efl_Gfx_Map_Data *p
}
  else
{
-  EINA_SAFETY_ON_NULL_RETURN_VAL(op->pivot.pivot, NULL);
+  if (!op->pivot.pivot)
+{
+   EINA_SAFETY_ERROR("safety check failed: op->pivot.pivot 
== NULL");
+   if (map_alloc) free(m);
+   return NULL;
+}
+
   pivot = op->pivot.pivot;
   px = pivot->geometry.x;
   py = pivot->geometry.y;

--