[EGIT] [core/efl] master 01/01: Efl.Ui.Nstate: do not call "changed" callback
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fd8e9f9c4e8dbda6c379dc464f562f5b2c681d31 commit fd8e9f9c4e8dbda6c379dc464f562f5b2c681d31 Author: Shinwoo Kim Date: Wed Feb 7 16:18:53 2018 +0900 Efl.Ui.Nstate: do not call "changed" callback Before solving following problem in Efl.Ui.Check https://phab.enlightenment.org/T6673 The changed callback is called with opposite value, if application is using Efl.Ui.Check with state pointer. The reason is that the changed callback is called in efl_ui_nstate_activate, and the value refered by state pointer is changed only after the efl_ui_nstate_activate is called. static void _activate(Evas_Object *obj) { EFL_UI_CHECK_DATA_GET(obj, sd); efl_ui_nstate_activate(obj); if (sd->statep) *sd->statep = efl_ui_nstate_value_get(obj); --- src/lib/elementary/efl_ui_check.c | 2 ++ src/lib/elementary/efl_ui_nstate.c | 18 ++ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index d36cdb0b1a..d119a8e6b9 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -75,6 +75,8 @@ _activate(Evas_Object *obj) _elm_access_say(E_("State: Off")); } + efl_event_callback_legacy_call(obj, EFL_UI_CHECK_EVENT_CHANGED, NULL); + if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_CHECKED, diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index c83ebfc8e4..5896826d09 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -63,18 +63,6 @@ _next_state_set(Efl_Ui_Nstate_Data *sd) if (sd->state == sd->nstate) sd->state = 0; } -static void -_state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd) -{ - char buf[64]; - - sprintf(buf, "elm,state,changed,%d", sd->state); - elm_layout_signal_emit(obj, buf, "elm"); - edje_object_message_signal_process(elm_layout_edje_get(obj)); - elm_layout_sizing_eval(obj); - efl_event_callback_legacy_call(obj, EFL_UI_NSTATE_EVENT_CHANGED, NULL); -} - EOLIAN static int _efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd) { @@ -106,12 +94,11 @@ _is_valid_state(Efl_Ui_Nstate_Data *sd, int state) } EOLIAN static void -_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state) +_efl_ui_nstate_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd, int state) { if (!_is_valid_state(pd, state)) return; pd->state = state; - _state_active(obj, pd); } EOLIAN static Efl_Ui_Theme_Apply @@ -133,10 +120,9 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static void -_efl_ui_nstate_activate(Eo *obj, Efl_Ui_Nstate_Data *_pd) +_efl_ui_nstate_activate(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *_pd) { _next_state_set(_pd); - _state_active(obj, _pd); } EOLIAN static void --
[EGIT] [core/efl] master 01/01: evas_object_textblock: add null checks for EAPIs
woohyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d8aa950a388a2d207c598e5b6df459ac4f298bda commit d8aa950a388a2d207c598e5b6df459ac4f298bda Author: WooHyun Jung Date: Wed Feb 7 14:19:46 2018 +0900 evas_object_textblock: add null checks for EAPIs --- src/lib/evas/canvas/evas_object_textblock.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 1a0023da5f..f934a81ccd 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -7192,6 +7192,7 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts, EAPI void evas_object_textblock_style_set(Eo *eo_obj, const Evas_Textblock_Style *ts) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); @@ -7269,8 +7270,9 @@ _efl_canvas_text_style_set(Eo *eo_obj, Efl_Canvas_Text_Data *o, const char *key, } EAPI Evas_Textblock_Style * -evas_object_textblock_style_get(const Eo *eo_obj EINA_UNUSED) +evas_object_textblock_style_get(const Eo *eo_obj) { + EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); @@ -7289,6 +7291,7 @@ _efl_canvas_text_style_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Text_Data *o, cons EAPI void evas_object_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Style *ts) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); @@ -7308,6 +7311,7 @@ evas_object_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Style *ts) EAPI const Evas_Textblock_Style* evas_object_textblock_style_user_peek(const Eo *eo_obj) { + EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); @@ -7318,6 +7322,7 @@ evas_object_textblock_style_user_peek(const Eo *eo_obj) EAPI void evas_object_textblock_style_user_pop(Eo *eo_obj) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); @@ -7327,6 +7332,7 @@ evas_object_textblock_style_user_pop(Eo *eo_obj) EAPI void evas_object_textblock_replace_char_set(Efl_Canvas_Text *eo_obj, const char *ch) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); @@ -7366,6 +7372,7 @@ _efl_canvas_text_is_empty_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Text_Data *o) EAPI void evas_object_textblock_valign_set(Efl_Canvas_Text *eo_obj, double align) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); evas_object_async_block(obj); @@ -7379,6 +7386,7 @@ evas_object_textblock_valign_set(Efl_Canvas_Text *eo_obj, double align) EAPI double evas_object_textblock_valign_get(const Efl_Canvas_Text *obj) { + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0); Efl_Canvas_Text_Data *o = efl_data_scope_get(obj, MY_CLASS); return o->valign; } @@ -7400,6 +7408,7 @@ _efl_canvas_text_bidi_delimiters_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Text_Dat EAPI const char * evas_object_textblock_replace_char_get(const Efl_Canvas_Text *obj) { + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); Efl_Canvas_Text_Data *o = efl_data_scope_get(obj, MY_CLASS); return o->repch; } @@ -7668,6 +7677,7 @@ _evas_object_textblock_text_markup_set(Eo *eo_obj, Efl_Canvas_Text_Data *o, EAPI void evas_object_textblock_text_markup_set(Eo *eo_obj, const char *text) { + EINA_SAFETY_ON_NULL_RETURN(eo_obj); Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); _evas_object_textblock_text_markup_set(eo_obj, o, text); } @@ -7809,6 +7819,7 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj, EAPI void evas_object_textblock_text_markup_prepend(Efl_Text_Cursor_Cursor *cur, const char *text) { + EINA_SAFETY_ON_NULL_RETURN(cur); _evas_object_textblock_text_markup_prepend(cur->obj, cur, text); } @@ -7973,6 +7984,7 @@ _evas_object_textblock_text_markup_get(Eo *eo_obj, Efl_Canvas_Text_Data *o) EAPI const char* evas_
[EGIT] [core/efl] efl-1.20 35/45: elm: fix typo in elm_list documentation
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=72e5bb3892a5d0a1d21aea6065673e33ee5e6077 commit 72e5bb3892a5d0a1d21aea6065673e33ee5e6077 Author: Jean Guyomarc'h Date: Sat Dec 30 10:13:54 2017 +0100 elm: fix typo in elm_list documentation --- src/lib/elementary/elm_list.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_list.eo b/src/lib/elementary/elm_list.eo index 27cc281f28..601d47b9b3 100644 --- a/src/lib/elementary/elm_list.eo +++ b/src/lib/elementary/elm_list.eo @@ -29,7 +29,7 @@ enum Elm.List.Mode is naturally bound by the list object's maximum size hints, set externally.]] expand, [[Besides setting a minimum size on the transverse axis, just like - on @Elm.List.Mode.limit, the list will set a minimum size on th + on @Elm.List.Mode.limit, the list will set a minimum size on the longitudinal axis, trying to reserve space to all its children to be visible at a time. . This is naturally bound by the list object's maximum size hints, set externally.]] --
[EGIT] [core/efl] efl-1.20 30/45: ecore-drm2: Fix enabling outputs
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=efaff2108cb18ca982ef60a9138a8aa69f039499 commit efaff2108cb18ca982ef60a9138a8aa69f039499 Author: Chris Michael Date: Tue Jan 9 12:43:15 2018 -0500 ecore-drm2: Fix enabling outputs Commit 9d583b3fdbed686642dbc0d96d1e417485ca0077 broke ecore_drm2_output_enabled_set function due changing order of setting output->enabled value. This patch fixes both issues by checking the 'enabled' variable being passed in. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index dd11feeae8..be853bd573 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1201,7 +1201,7 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled) if (!output->connected) return; if (output->enabled == enabled) return; - if (output->enabled) + if (enabled) { output->enabled = enabled; ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON); --
[EGIT] [core/efl] efl-1.20 36/45: ecore_con: bug workaround SO_REUSEADDR and EADDRINUSE from bind (fix)
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=73b5982af1f79de84a7d1fc4d41c2a3ec6c89ff4 commit 73b5982af1f79de84a7d1fc4d41c2a3ec6c89ff4 Author: Carsten Haitzler (Rasterman) Date: Wed Dec 20 21:10:53 2017 +0900 ecore_con: bug workaround SO_REUSEADDR and EADDRINUSE from bind (fix) what i'm seeing is this with local unix sockets: 1. server process not cleanly shut down (kill -9 for example). 2. run server process again and bind fails due to EADDRINUSE 3. we ARE doing setsockopt() with SO_REUSEADDR set to 1 ... this just makes no sense because setsockopt() SHOULD allow use to re-use... the previous efreetd process for example is gone. no such process, yet socket is not re-usable. this should just not happen due to SO_REUSEADDR, but it does. this has nasty consequences like efreetd maybe never running because of stale sockets. this should never have happened, but it does. odd. so a hacky workaround: 1. try bind. 2. if bind fails with EADDRINUSE and its a socket path AND pd->unlink_before_bind is NOT set... then try a connect to the socket. 3. if connect succeeds then fail as normal (close socket and error on bind'ing) if connect fails then we have a stale socket, so unlink it forcibly. create the socket again and try bind again. hacky but... fixes the core issue. @fix --- src/lib/ecore_con/efl_net_server_unix.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_con/efl_net_server_unix.c b/src/lib/ecore_con/efl_net_server_unix.c index b1a1d2d158..65f2b255e1 100644 --- a/src/lib/ecore_con/efl_net_server_unix.c +++ b/src/lib/ecore_con/efl_net_server_unix.c @@ -50,7 +50,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd) const char *address = efl_net_server_address_get(o); struct sockaddr_un addr = { .sun_family = AF_UNIX }; socklen_t addrlen; - SOCKET fd; + SOCKET fd = INVALID_SOCKET; Eina_Error err = 0; int r; @@ -108,6 +108,17 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd) if ((err == EADDRINUSE) && (pd->unlink_before_bind) && (addr.sun_path[0] != '\0')) { closesocket(fd); + fd = INVALID_SOCKET; + err = 0; + continue; + } + if ((err == EADDRINUSE) && (addr.sun_path[0] != '\0') && + (connect(fd, (struct sockaddr *)&addr, addrlen) != 0)) + { + DBG("bind(" SOCKET_FMT ", %s): failed with EADDRINUSE but connect also failed, so unlink socket file and try again", fd, address); + closesocket(fd); + unlink(addr.sun_path); + fd = INVALID_SOCKET; err = 0; continue; } @@ -118,6 +129,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd) } while (pd->unlink_before_bind); + if (fd == INVALID_SOCKET) goto error; efl_loop_fd_set(o, fd); r = listen(fd, 0); --
[EGIT] [core/efl] efl-1.20 33/45: emotion: unset DISPLAY when loading an engine under wayland
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=9f5c04cf7612df231e2602c97fa9d1c9775fd432 commit 9f5c04cf7612df231e2602c97fa9d1c9775fd432 Author: Mike Blumenkrantz Date: Thu Jan 4 10:10:38 2018 -0500 emotion: unset DISPLAY when loading an engine under wayland ensure that this doesn't trigger xwayland deadlocks during gst init probably fixes T6418 @fix --- src/lib/emotion/emotion_modules.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c index 944ea0184d..3aa0f0643f 100644 --- a/src/lib/emotion/emotion_modules.c +++ b/src/lib/emotion/emotion_modules.c @@ -360,6 +360,7 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O const Emotion_Engine *engine; void *data; Eina_Module *m; + char *disp = NULL; _emotion_modules_load(); @@ -369,6 +370,13 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O DBG("using EMOTION_ENGINE=%s", name); } + if (getenv("WAYLAND_DISPLAY")) + { +disp = eina_strdup(getenv("DISPLAY")); +unsetenv("DISPLAY"); + } + + if (name) { m = _find_mod(name); @@ -401,6 +409,8 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O if (data) { INF("Using requested engine %s, data=%p", name, data); + if (disp) setenv("DISPLAY", disp, 1); + free(disp); return _emotion_engine_instance_new(engine, obj, data); } @@ -418,11 +428,15 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O if (data) { INF("Using fallback engine %s, data=%p", engine->name, data); + if (disp) setenv("DISPLAY", disp, 1); + free(disp); return _emotion_engine_instance_new(engine, obj, data); } } ERR("No engine worked"); + if (disp) setenv("DISPLAY", disp, 1); + free(disp); return NULL; } --
[EGIT] [core/efl] efl-1.20 37/45: eina: fix random segfaults when displaying BT
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=b0c964b2cbe52fabe94e7a9680daea201685887e commit b0c964b2cbe52fabe94e7a9680daea201685887e Author: Jean Guyomarc'h Date: Tue Dec 19 16:33:18 2017 +0100 eina: fix random segfaults when displaying BT Under some circumstances, eina crashes when attempting to display the backtrace, because dladdr() may yield a dli_fname that is NULL. This is especially annoying in realease, when the backtrace is shown by default when CRI/ERR are thrown. @fix --- src/lib/eina/eina_debug_bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c index c9bf23c541..21b067c395 100644 --- a/src/lib/eina/eina_debug_bt.c +++ b/src/lib/eina/eina_debug_bt.c @@ -67,7 +67,7 @@ _eina_debug_dump_fhandle_bt(FILE *f, void **bt, int btlen) offset = base = 0; // we have little choice but to hope/assume dladdr() doesn't alloc // anything here -if ((dladdr(bt[i], &info)) && (info.dli_fname[0])) +if ((dladdr(bt[i], &info)) && (info.dli_fname) && (info.dli_fname[0])) { offset = (unsigned long long)(uintptr_t)bt[i]; base = (unsigned long long)(uintptr_t)info.dli_fbase; --
[EGIT] [core/efl] efl-1.20 38/45: eldbus test - del not unref obj as it has a parent ...
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=c2166206a5231f20cad26df192f669a76e0f63ff commit c2166206a5231f20cad26df192f669a76e0f63ff Author: Carsten Haitzler (Rasterman) Date: Tue Nov 21 21:36:30 2017 +0900 eldbus test - del not unref obj as it has a parent ... if you ONLy unref it wont force an unparent if you never del'd. @fix --- src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c index cb0ccd46d5..a5c46bd05e 100644 --- a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c +++ b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c @@ -42,7 +42,7 @@ _setup(void) static void _teardown(void) { - efl_unref(fake_server_object); + efl_del(fake_server_object); fake_server_stop(fake_server); --
[EGIT] [core/efl] efl-1.20 32/45: ecore evas init - init ecore then evas not the other way...
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=df8f08b129911c0c400909cab26028f3b0bd5276 commit df8f08b129911c0c400909cab26028f3b0bd5276 Author: Carsten Haitzler (Rasterman) Date: Fri Jan 5 02:10:26 2018 +0900 ecore evas init - init ecore then evas not the other way... because as of... i don't know when, evas relies on ecore with ecore_pipe_add to create the async fd... and if you init evas then ecore this doesnt work. obviously. well now it isn't working. probably due to new efl loop work. but the efl loop code is correct. ecore_pipe_add should never work until you init ecore... it just happesn to have managed to be gotten away with for a while. @fix --- src/lib/ecore_evas/ecore_evas.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 39b93e587b..d108dfd8c3 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -613,12 +613,12 @@ ecore_evas_init(void) if (++_ecore_evas_init_count != 1) return _ecore_evas_init_count; - if (!evas_init()) - return --_ecore_evas_init_count; - if (!ecore_init()) goto shutdown_evas; + if (!evas_init()) + return --_ecore_evas_init_count; + _ecore_evas_log_dom = eina_log_domain_register ("ecore_evas", ECORE_EVAS_DEFAULT_LOG_COLOR); if(_ecore_evas_log_dom < 0) @@ -704,8 +704,8 @@ ecore_evas_shutdown(void) eina_log_domain_unregister(_ecore_evas_log_dom); _ecore_evas_log_dom = -1; - ecore_shutdown(); evas_shutdown(); + ecore_shutdown(); return _ecore_evas_init_count; } --
[EGIT] [core/efl] efl-1.20 39/45: eeze: Remove unused device variables
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=5d4dc6307a381750005e80f8488f483230ccd217 commit 5d4dc6307a381750005e80f8488f483230ccd217 Author: Chris Michael Date: Thu Dec 14 07:35:07 2017 -0500 eeze: Remove unused device variables As we do not ever use the udev_devices created from udev_device_new_from_syspath in these functions, remove them. @fix Signed-off-by: Chris Michael --- src/lib/eeze/eeze_udev_find.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c index b96e5f33b9..4fda826231 100644 --- a/src/lib/eeze/eeze_udev_find.c +++ b/src/lib/eeze/eeze_udev_find.c @@ -325,7 +325,6 @@ eeze_udev_find_by_filter(const char *subsystem, { _udev_enumerate *en; _udev_list_entry *devs, *cur; - _udev_device *device; const char *devname; Eina_List *ret = NULL; @@ -347,15 +346,11 @@ eeze_udev_find_by_filter(const char *subsystem, udev_list_entry_foreach(cur, devs) { devname = udev_list_entry_get_name(cur); -device = udev_device_new_from_syspath(udev, devname); -if (name) - if (!strstr(devname, name)) -goto out; +if (name && (!strstr(devname, name))) + continue; ret = eina_list_append(ret, eina_stringshare_add(devname)); -out: -udev_device_unref(device); } udev_enumerate_unref(en); return ret; @@ -367,7 +362,6 @@ eeze_udev_find_by_sysattr(const char *sysattr, { _udev_enumerate *en; _udev_list_entry *devs, *cur; - _udev_device *device; const char *devname; Eina_List *ret = NULL; @@ -385,9 +379,7 @@ eeze_udev_find_by_sysattr(const char *sysattr, udev_list_entry_foreach(cur, devs) { devname = udev_list_entry_get_name(cur); -device = udev_device_new_from_syspath(udev, devname); ret = eina_list_append(ret, eina_stringshare_add(devname)); -udev_device_unref(device); } udev_enumerate_unref(en); return ret; @@ -398,7 +390,6 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname) { _udev_enumerate *en; _udev_list_entry *devs, *cur; - _udev_device *device; const char *devname; Eina_List *ret = NULL; @@ -413,10 +404,7 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname) udev_list_entry_foreach(cur, devs) { devname = udev_list_entry_get_name(cur); -device = udev_device_new_from_syspath(udev, devname); -if (!device) continue; ret = eina_list_append(ret, eina_stringshare_add(devname)); -udev_device_unref(device); } udev_enumerate_unref(en); return ret; --
[EGIT] [core/efl] efl-1.20 31/45: efl thread signal masks - fix up for various threads manually created
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=0d6123f6f781f18b6731dfbd153a3b7e9a534392 commit 0d6123f6f781f18b6731dfbd153a3b7e9a534392 Author: Carsten Haitzler (Rasterman) Date: Sat Jan 6 17:37:12 2018 +0900 efl thread signal masks - fix up for various threads manually created so xine module plus 2 eina dbug threads didnt set up signal blocking/masks correctly. xine use ssigprocmask not pthread_sigmask and the other 2 didnt even bother at all. fix this so these threads all block most of these commnly caught signals so these threads never get them --- src/lib/eina/eina_debug_cpu.c | 22 ++ src/lib/eina/eina_debug_timer.c | 21 + src/modules/emotion/xine/emotion_xine.c | 4 ++-- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/lib/eina/eina_debug_cpu.c b/src/lib/eina/eina_debug_cpu.c index 0f25b4bfbd..20f83b7cea 100644 --- a/src/lib/eina/eina_debug_cpu.c +++ b/src/lib/eina/eina_debug_cpu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -294,12 +295,32 @@ Eina_Bool _eina_debug_cpu_init(void) { // if it's already running - we're good. +#ifndef _WIN32 if (!_sysmon_thread_runs) { int err; +sigset_t oldset, newset; + eina_lock_new(&_sysmon_lock); eina_lock_take(&_sysmon_lock); +sigemptyset(&newset); +sigaddset(&newset, SIGPIPE); +sigaddset(&newset, SIGALRM); +sigaddset(&newset, SIGCHLD); +sigaddset(&newset, SIGUSR1); +sigaddset(&newset, SIGUSR2); +sigaddset(&newset, SIGHUP); +sigaddset(&newset, SIGQUIT); +sigaddset(&newset, SIGINT); +sigaddset(&newset, SIGTERM); +#ifdef SIGPWR +sigaddset(&newset, SIGPWR); +#endif +pthread_sigmask(SIG_BLOCK, &newset, &oldset); + err = pthread_create(&_sysmon_thread, NULL, _sysmon, NULL); + +pthread_sigmask(SIG_SETMASK, &oldset, NULL); if (err != 0) { e_debug("EINA DEBUG ERROR: Can't create debug sysmon thread!"); @@ -308,6 +329,7 @@ _eina_debug_cpu_init(void) _sysmon_thread_runs = EINA_TRUE; } eina_debug_opcodes_register(NULL, _OPS(), NULL, NULL); +#endif return EINA_TRUE; } diff --git a/src/lib/eina/eina_debug_timer.c b/src/lib/eina/eina_debug_timer.c index fb1d632188..6a3862e14d 100644 --- a/src/lib/eina/eina_debug_timer.c +++ b/src/lib/eina/eina_debug_timer.c @@ -160,7 +160,28 @@ eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data _timer_append(t); if (!_thread_runs) { +#ifndef _WIN32 +sigset_t oldset, newset; + +sigemptyset(&newset); +sigaddset(&newset, SIGPIPE); +sigaddset(&newset, SIGALRM); +sigaddset(&newset, SIGCHLD); +sigaddset(&newset, SIGUSR1); +sigaddset(&newset, SIGUSR2); +sigaddset(&newset, SIGHUP); +sigaddset(&newset, SIGQUIT); +sigaddset(&newset, SIGINT); +sigaddset(&newset, SIGTERM); +# ifdef SIGPWR +sigaddset(&newset, SIGPWR); +# endif +pthread_sigmask(SIG_BLOCK, &newset, &oldset); +#endif int err = pthread_create(&_thread, NULL, _monitor, NULL); +#ifndef _WIN32 +pthread_sigmask(SIG_SETMASK, &oldset, NULL); +#endif if (err != 0) { e_debug("EINA DEBUG ERROR: Can't create debug timer thread!"); diff --git a/src/modules/emotion/xine/emotion_xine.c b/src/modules/emotion/xine/emotion_xine.c index dc89ee0eb1..4beaa64e9a 100644 --- a/src/modules/emotion/xine/emotion_xine.c +++ b/src/modules/emotion/xine/emotion_xine.c @@ -382,10 +382,10 @@ em_add(const Emotion_Engine *api EINA_UNUSED, #ifdef SIGPWR sigaddset(&newset, SIGPWR); #endif - sigprocmask(SIG_BLOCK, &newset, &oldset); + pthread_sigmask(SIG_BLOCK, &newset, &oldset); pthread_create(&ev->get_pos_len_th, NULL, _em_get_pos_len_th, ev); pthread_create(&ev->slave_th, NULL, _em_slave, ev); - sigprocmask(SIG_SETMASK, &oldset, NULL); + pthread_sigmask(SIG_SETMASK, &oldset, NULL); pthread_detach(ev->slave_th); _em_slave_event(ev, 1, NULL); --
[EGIT] [core/efl] efl-1.20 42/45: ecore-evas-drm: Check for XDG_SEAT existence
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=18a941bb701b58ced76d72a06fa607a8c2209667 commit 18a941bb701b58ced76d72a06fa607a8c2209667 Author: Chris Michael Date: Fri Dec 1 15:32:35 2017 -0500 ecore-evas-drm: Check for XDG_SEAT existence Small patch to allow specifying a different seat via XDG_SEAT env variable. If no seat name is passed as ecore_evas options, then we would always default to 'seat0'. As this may not be desirable in all situations, allow for an override via XDG_SEAT env var. ref T6455 @fix Signed-off-by: Chris Michael --- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 4 1 file changed, 4 insertions(+) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 35cd8d83a1..d48e752e06 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -147,6 +147,10 @@ _ecore_evas_drm_init(Ecore_Evas *ee, Ecore_Evas_Engine_Drm_Data *edata, const ch goto init_err; } + /* NB: No seat name passed in, try to get from env */ + if (!device) device = getenv("XDG_SEAT"); + + /* NB: fallback to seat0 if env var is not set */ if (!device) device = "seat0"; edata->dev = ecore_drm2_device_find(device, 0); --
[EGIT] [core/efl] efl-1.20 25/45: efl-wl: send more mouse buttons to clients
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=9c394a98e182ed6743ff1ea2a212d37d237081da commit 9c394a98e182ed6743ff1ea2a212d37d237081da Author: Mike Blumenkrantz Date: Wed Jan 17 17:33:57 2018 -0500 efl-wl: send more mouse buttons to clients @fix --- src/lib/efl_wl/efl_wl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index e0d7a0ddf3..91c7140bd6 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1999,11 +1999,17 @@ comp_surface_mouse_button(Comp_Surface *cs, Comp_Seat *s, uint32_t timestamp, ui btn = BTN_RIGHT; break; case 4: +btn = BTN_SIDE; +break; case 5: +btn = BTN_EXTRA; +break; case 6: +btn = BTN_FORWARD; +break; case 7: -/* these are supposedly axis events */ -return; +btn = BTN_BACK; +break; default: btn = button_id + BTN_SIDE - 8; break; --
[EGIT] [core/efl] efl-1.20 29/45: ecore-drm2: return supported rotations if not using hardware
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=a76fd936cf211de146e2edfb56da188d6e50110c commit a76fd936cf211de146e2edfb56da188d6e50110c Author: Chris Michael Date: Tue Jan 9 12:06:53 2018 -0500 ecore-drm2: return supported rotations if not using hardware If we are Not using Atomic/Hardware support for output rotations, we should return all available rotations as these will still work in software mode. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 256b1889c7..dd11feeae8 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1514,17 +1514,24 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output) { int ret = -1; - Eina_List *l; - Ecore_Drm2_Plane_State *pstate; EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); - EINA_LIST_FOREACH(output->plane_states, l, pstate) + if (_ecore_drm2_use_atomic) { -if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue; -ret = pstate->supported_rotations; -break; +Ecore_Drm2_Plane_State *pstate; +Eina_List *l; + +EINA_LIST_FOREACH(output->plane_states, l, pstate) + { + if (pstate->type.value != DRM_PLANE_TYPE_PRIMARY) continue; + ret = pstate->supported_rotations; + break; + } } + else + return (ECORE_DRM2_ROTATION_NORMAL | ECORE_DRM2_ROTATION_90 | + ECORE_DRM2_ROTATION_180 | ECORE_DRM2_ROTATION_270); return ret; } --
[EGIT] [core/efl] efl-1.20 23/45: efl-wl: set event ON_HOLD flag when they are sent to a surface
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=fc9b3b814141341bbde167135aba76632e4e6281 commit fc9b3b814141341bbde167135aba76632e4e6281 Author: Mike Blumenkrantz Date: Wed Jan 17 17:33:57 2018 -0500 efl-wl: set event ON_HOLD flag when they are sent to a surface use a flag to indicate when processed events have been internally processed @fix --- src/lib/efl_wl/efl_wl.c | 122 1 file changed, 92 insertions(+), 30 deletions(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 841ce3d97d..0dd3e060ff 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -239,6 +239,7 @@ typedef struct Comp_Seat Eina_Bool focused : 1; Eina_Bool selection_changed : 1; Eina_Bool selection_exists : 1; + Eina_Bool event_propagate : 1; } Comp_Seat; typedef struct Comp_Buffer_State @@ -1882,7 +1883,7 @@ comp_surface_send_data_device_enter(Comp_Surface *cs, Comp_Seat *s) wl_fixed_from_int(cx - x), wl_fixed_from_int(cy - y), offer); } -static void +static Eina_Bool comp_surface_send_pointer_enter(Comp_Surface *cs, Comp_Seat *s, int cx, int cy) { Eina_List *l, *ll; @@ -1890,32 +1891,39 @@ comp_surface_send_pointer_enter(Comp_Surface *cs, Comp_Seat *s, int cx, int cy) uint32_t serial; int x, y; - if (s->ptr.enter && (cs != s->grab)) return; - if (!comp_surface_check_grab(cs, s)) return; + if (s->ptr.enter && (cs != s->grab)) return EINA_FALSE; + if (!comp_surface_check_grab(cs, s)) return EINA_FALSE; s->ptr.enter = cs; - if (cs->dead) return; + if (cs->dead) return EINA_FALSE; if (s->drag.res && (!s->drag.tch)) { comp_surface_send_data_device_enter(cs, s); -return; +return EINA_TRUE; } l = seat_ptr_resources_get(s, wl_resource_get_client(cs->res)); - if (!l) return; + if (!l) return EINA_FALSE; s->ptr.enter_serial = serial = wl_display_next_serial(cs->c->display); //fprintf(stderr, "ENTER %s\n", cs->shell.popup ? "POPUP" : "TOPLEVEL"); evas_object_geometry_get(cs->obj, &x, &y, NULL, NULL); EINA_LIST_FOREACH(l, ll, res) wl_pointer_send_enter(res, serial, cs->res, wl_fixed_from_int(cx - x), wl_fixed_from_int(cy - y)); + return EINA_TRUE; } static void comp_surface_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) { Evas_Event_Mouse_In *ev = event_info; + Comp_Seat *s; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; - comp_surface_send_pointer_enter(data, seat_find(data, ev->dev), ev->canvas.x, ev->canvas.y); + s = seat_find(data, ev->dev); + if (comp_surface_send_pointer_enter(data, s, ev->canvas.x, ev->canvas.y)) + { +s->event_propagate = 1; +ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; + } } static void @@ -1932,40 +1940,47 @@ comp_surface_send_data_device_leave(Comp_Surface *cs, Comp_Seat *s) wl_data_device_send_leave(res); } -static void +static Eina_Bool comp_surface_send_pointer_leave(Comp_Surface *cs, Comp_Seat *s) { Eina_List *l, *ll; struct wl_resource *res; uint32_t serial; - if (s->ptr.enter != cs) return; - if (!comp_surface_check_grab(cs, s)) return; + if (s->ptr.enter != cs) return EINA_FALSE; + if (!comp_surface_check_grab(cs, s)) return EINA_FALSE; s->ptr.enter = NULL; - if (cs->dead) return; + if (cs->dead) return EINA_FALSE; if (s->drag.res) { comp_surface_send_data_device_leave(cs, s); -return; +return EINA_TRUE; } l = seat_ptr_resources_get(s, wl_resource_get_client(cs->res)); - if (!l) return; + if (!l) return EINA_FALSE; serial = wl_display_next_serial(cs->c->display); //fprintf(stderr, "LEAVE %s\n", cs->shell.popup ? "POPUP" : "TOPLEVEL"); EINA_LIST_FOREACH(l, ll, res) wl_pointer_send_leave(res, serial, cs->res); + return EINA_TRUE; } static void comp_surface_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) { Evas_Event_Mouse_Out *ev = event_info; + Comp_Seat *s; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; - comp_surface_send_pointer_leave(data, seat_find(data, ev->dev)); + s = seat_find(data, ev->dev); + if (comp_surface_send_pointer_leave(data, s)) + { +s->event_propagate = 1; +ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; + } } -static void +static Eina_Bool comp_surface_mouse_button(Comp_Surface *cs, Comp_Seat *s, uint32_t timestamp, uint32_t button_id, uint32_t state) { uint32_t serial, btn; @@ -1993,13 +2008,13 @@ comp_surface_mouse_button(Comp_Surface *cs, Comp_Seat *s, uint32_t timestamp, ui btn = button_id + BTN_SIDE - 8; break; } - if (s->ptr.enter != cs) return; - if (!comp_surface_check_grab(cs, s)) return; + if (s->ptr.enter != cs) return EINA_FALSE; + if (!c
[EGIT] [core/efl] efl-1.20 41/45: eina: Fix typo in doxygen
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=01fccf3fac1d8548105653357eaedb159a599952 commit 01fccf3fac1d8548105653357eaedb159a599952 Author: Chris Michael Date: Mon Dec 11 14:51:55 2017 -0500 eina: Fix typo in doxygen @fix Signed-off-by: Chris Michael --- src/lib/eina/eina_strbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_strbuf.h b/src/lib/eina/eina_strbuf.h index 7d90ae6324..0008d870a2 100644 --- a/src/lib/eina/eina_strbuf.h +++ b/src/lib/eina/eina_strbuf.h @@ -730,7 +730,7 @@ EAPI Eina_Rw_Slice eina_strbuf_rw_slice_get(const Eina_Strbuf *buf) EINA_WARN_UN * * @param buf The buffer to get the string from and which will be freed * - * @return The string contained by bug. The caller must release the memory of the returned string by calling + * @return The string contained by buf. The caller must release the memory of the returned string by calling * free(). * * @since 1.19 --
[EGIT] [core/efl] efl-1.20 40/45: eeze: Don't leak udev enumeration
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=751fd484aec344ba7491ff3686acf5188de201c1 commit 751fd484aec344ba7491ff3686acf5188de201c1 Author: Chris Michael Date: Thu Dec 14 07:31:39 2017 -0500 eeze: Don't leak udev enumeration If we cannot create a new udev device, then we should free the previously created udev enumeration from above. @fix Signed-off-by: Chris Michael --- src/lib/eeze/eeze_udev_find.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c index 4fda826231..3b1e5ef926 100644 --- a/src/lib/eeze/eeze_udev_find.c +++ b/src/lib/eeze/eeze_udev_find.c @@ -28,7 +28,10 @@ eeze_udev_find_similar_from_syspath(const char *syspath) return NULL; if (!(device = _new_device(syspath))) - return NULL; + { +udev_enumerate_unref(en); +return NULL; + } vendor = udev_device_get_property_value(device, "ID_VENDOR_ID"); --
[EGIT] [core/efl] efl-1.20 34/45: elm: fix memleak in combobox
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=0b43d90e2b127fdacbf0a024818fb4cfc94ee91f commit 0b43d90e2b127fdacbf0a024818fb4cfc94ee91f Author: Jean Guyomarc'h Date: Sat Dec 30 10:14:12 2017 +0100 elm: fix memleak in combobox @fix --- src/lib/elementary/elc_combobox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c index 0704f0d39a..f996b40aae 100644 --- a/src/lib/elementary/elc_combobox.c +++ b/src/lib/elementary/elc_combobox.c @@ -170,6 +170,7 @@ _table_resize(void *data) // take the first, and update according to that evas_object_geometry_get(elm_object_item_track(eina_list_data_get(realized)), NULL, NULL, NULL, &h); + eina_list_free(realized); } sd->item_height = h; --
[EGIT] [core/efl] efl-1.20 44/45: elm ifrace scrollable - fix uninitialized values on scroll asjust
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=544336ea658815510cdede2364889a5913a5fda5 commit 544336ea658815510cdede2364889a5913a5fda5 Author: Carsten Haitzler (Rasterman) Date: Fri Nov 24 23:52:08 2017 +0900 elm ifrace scrollable - fix uninitialized values on scroll asjust dragable values were invalid (not fetched) so vx/y were junk and this was making decisions based on that. guarantee it to be 0. @fix --- src/lib/elementary/elm_interface_scrollable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index 89fb972e39..13b371238a 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -792,9 +792,9 @@ _elm_scroll_scroll_bar_size_adjust(Elm_Scrollable_Smart_Interface_Data *sid) sid->size_adjust_recurse++; if ((sid->content) || (sid->extern_pan)) { -Evas_Coord x, y, w, h, mx = 0, my = 0, vw = 0, vh = 0, px, py, - minx = 0, miny = 0; -double vx, vy, size; +Evas_Coord x, y, w, h, mx = 0, my = 0, vw = 0, vh = 0, + px = 0, py = 0, minx = 0, miny = 0; +double vx = 0.0, vy = 0.0, size; edje_object_calc_force(sid->edje_obj); edje_object_part_geometry_get --
[EGIT] [core/efl] efl-1.20 43/45: eina_file: make sure we use a stringshare when virtualized.
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=df7873bd6fd136ebc3d1bda2b854e53c57e84590 commit df7873bd6fd136ebc3d1bda2b854e53c57e84590 Author: Al Poole Date: Thu Nov 30 13:57:25 2017 + eina_file: make sure we use a stringshare when virtualized. As the filename is now a stringshare, also make sure virtual files use stringshares for the filename! Also when unmapping we still need to test whether it is copied or not as unmap will break on less tolerant architectures. @fix T6449 --- src/lib/eina/eina_file.c| 2 +- src/lib/eina/eina_file_common.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c index c2c7f8f4aa..608efb0f18 100644 --- a/src/lib/eina/eina_file.c +++ b/src/lib/eina/eina_file.c @@ -297,7 +297,7 @@ eina_file_real_close(Eina_File *file) if (file->fd != -1) { -if (file->global_map != MAP_FAILED) +if (!file->copied && file->global_map != MAP_FAILED) munmap(file->global_map, file->length); close(file->fd); } diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c index 91036398cc..27e92bac5b 100644 --- a/src/lib/eina/eina_file_common.c +++ b/src/lib/eina/eina_file_common.c @@ -422,9 +422,9 @@ eina_file_virtualize(const char *virtual_name, const void *data, unsigned long l EINA_MAGIC_SET(file, EINA_FILE_MAGIC); file->filename = (char *)(file + 1); if (virtual_name) - strcpy((char *)file->filename, virtual_name); + file->filename = eina_stringshare_add(virtual_name); else - sprintf((char *)file->filename, tmpname, ti); + file->filename = eina_stringshare_printf(tmpname, ti); eina_lock_recursive_new(&file->lock); file->mtime = ti / 1000; --
[EGIT] [core/efl] efl-1.20 28/45: efl wl - fix segv where garbage ptr to comp surface is still there
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=90d464c5add7450394d2784233a862c5f2dcc1fa commit 90d464c5add7450394d2784233a862c5f2dcc1fa Author: Carsten Haitzler (Rasterman) Date: Tue Jan 16 14:50:31 2018 +0900 efl wl - fix segv where garbage ptr to comp surface is still there comp surface destruction doesnt clear the pointer to one in the comp struct that then is garbage later. fix. --- src/lib/efl_wl/efl_wl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 91c7140bd6..78c107272d 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -2299,6 +2299,9 @@ comp_surface_smart_del(Evas_Object *obj) { Comp_Surface *cs = evas_object_smart_data_get(obj); + if ((cs->c) && (cs->c->active_surface == cs)) + cs->c->active_surface = NULL; + array_clear(&cs->input_rects); array_clear(&cs->opaque_rects); eina_tiler_free(cs->opaque); --
[EGIT] [core/efl] efl-1.20 16/45: ecore-x: perform internal shutdown on io error if callback is set
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=c52e0409e252e1b82473fcba09e172f7141e360e commit c52e0409e252e1b82473fcba09e172f7141e360e Author: Mike Blumenkrantz Date: Mon Jan 22 16:09:00 2018 -0500 ecore-x: perform internal shutdown on io error if callback is set avoid crashing in callback when referencing dead display or handling events @fix --- src/lib/ecore_x/ecore_x.c | 47 ++- src/lib/ecore_x/ecore_x_error.c | 6 - src/lib/ecore_x/ecore_x_private.h | 1 + 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index 3fcf0ec279..300768120f 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -783,14 +783,11 @@ ecore_x_init_from_display(Ecore_X_Display *display) return --_ecore_x_init_count; } -static int -_ecore_x_shutdown(int close_display) +int +_ecore_x_shutdown(void) { - if (--_ecore_x_init_count != 0) - return _ecore_x_init_count; - if (!_ecore_x_disp) - return _ecore_x_init_count; + return 0; LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -857,19 +854,9 @@ _ecore_x_shutdown(int close_display) ECORE_X_EVENT_PRESENT_COMPLETE, ECORE_X_EVENT_PRESENT_IDLE); ecore_main_fd_handler_del(_ecore_x_fd_handler_handle); - if (close_display) - XCloseDisplay(_ecore_x_disp); - else - { -close(ConnectionNumber(_ecore_x_disp)); -// FIXME: may have to clean up x display internal here -// getting segv here? hmmm. odd. disable -//XFree(_ecore_x_disp); - } free(_ecore_x_event_handlers); _ecore_x_fd_handler_handle = NULL; - _ecore_x_disp = NULL; _ecore_x_event_handlers = NULL; _ecore_x_events_shutdown(); _ecore_x_input_shutdown(); @@ -877,6 +864,12 @@ _ecore_x_shutdown(int close_display) _ecore_x_dnd_shutdown(); ecore_x_netwm_shutdown(); + return 0; +} + +static void +_ecore_x_shutdown2(void) +{ ecore_event_shutdown(); ecore_shutdown(); @@ -884,8 +877,6 @@ _ecore_x_shutdown(int close_display) _ecore_xlib_log_dom = -1; eina_shutdown(); _ecore_xlib_sync = EINA_FALSE; - - return _ecore_x_init_count; } /** @@ -901,7 +892,14 @@ _ecore_x_shutdown(int close_display) EAPI int ecore_x_shutdown(void) { - return _ecore_x_shutdown(1); + if (--_ecore_x_init_count != 0) + return _ecore_x_init_count; + if (_ecore_x_shutdown()) return _ecore_x_init_count; + if (_ecore_x_disp) + XCloseDisplay(_ecore_x_disp); + _ecore_x_disp = NULL; + _ecore_x_shutdown2(); + return 0; } /** @@ -914,7 +912,16 @@ ecore_x_shutdown(void) EAPI int ecore_x_disconnect(void) { - return _ecore_x_shutdown(0); + if (--_ecore_x_init_count != 0) + return _ecore_x_init_count; + if (_ecore_x_shutdown()) return _ecore_x_init_count; + close(ConnectionNumber(_ecore_x_disp)); +// FIXME: may have to clean up x display internal here +// getting segv here? hmmm. odd. disable +//XFree(_ecore_x_disp); + _ecore_x_disp = NULL; + _ecore_x_shutdown2(); + return 0; } /** diff --git a/src/lib/ecore_x/ecore_x_error.c b/src/lib/ecore_x/ecore_x_error.c index ad3d32257a..9facf0733b 100644 --- a/src/lib/ecore_x/ecore_x_error.c +++ b/src/lib/ecore_x/ecore_x_error.c @@ -172,7 +172,11 @@ _ecore_x_io_error_handle(Display *d) if (d == _ecore_x_disp) { if (_io_error_func) - _io_error_func(_io_error_data); + { + _ecore_x_disp = NULL; + _ecore_x_shutdown(); + _io_error_func(_io_error_data); + } else exit(-1); } diff --git a/src/lib/ecore_x/ecore_x_private.h b/src/lib/ecore_x/ecore_x_private.h index de7f853797..7374a0d9ee 100644 --- a/src/lib/ecore_x/ecore_x_private.h +++ b/src/lib/ecore_x/ecore_x_private.h @@ -396,6 +396,7 @@ Ecore_Event_Mouse_Button *_ecore_mouse_button(int event, void _ecore_x_modifiers_get(void); KeySym _ecore_x_XKeycodeToKeysym(Display *display, KeyCode keycode, int index); +int _ecore_x_shutdown(void); //#define LOGFNS 1 #ifdef LOGFNS --
[EGIT] [core/efl] efl-1.20 45/45: eo - by default on 64bit only use 47 bits because of luajit
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=710424ad7d7ad3ecfff56d20c3062dfee452abab commit 710424ad7d7ad3ecfff56d20c3062dfee452abab Author: Carsten Haitzler (Rasterman) Date: Thu Nov 23 13:27:52 2017 +0900 eo - by default on 64bit only use 47 bits because of luajit luajit wants to check the upper 17 bits of pointers and assume they are all 0 if on a 64bit architecture. it will panic and barf if they are used. we have been using them in our eoid's for a long time. my take on this is that this is unportable. assuming how many bits are or are not valid in an opaque pointer (void *) that is simply passed to you and you cannot dereference or use (no size information even for what amount of data it points to etc.), is just wrong. it's not portable and it's trying to be too smart and creating such issues. my take is that luajit needs a fix for this in the longer term. but for now let's have a 47 bit mode and go with that. it does mean i have to drop our generation counter to 10 bits on 64bit (from 27 bits) which increases likelihood of eoid re-use being falsely detected as valid (before on 64bit it was 1 in 130 million or so chance, with this 47 bit change it's 1 in 1000. but to be fair on 32bit it's 7 bits for gen count so 1 in 127 ... so still more than 10x "safer" than on 32bit... but still...). the relevant check in luajit is: (((uint64_t)(p) >> 47) ? (lj_err_msg(L, LJ_ERR_BADLU), NULL) : (p)) it ONLY does this on 64bit. on 32bit pointers are not checked for validity at all. as an aside, armv8.2 seemingly will bring 52bit addresses so luajit is going to fall over flat on a newer rev of armv8. it may be x86 also uses more bits. last i knew it was 48bits so the 47 bit check luajit does i think is even wrong for x86-64. to be detailed i read: amd64 arch == 48 bits (so luajit is wrong). even better In addition, the AMD specification requires that the most significant 16 bits of any virtual address, bits 48 through 63, must be copies of bit 47 (in a manner akin to sign extension). so if the upper bit of 48 is set THEN all the 16 upper bits must be 1... breaking luajit, even if it were 47bit and this rule applied. I read the architecture allows for up to 52bits of actual addresses so architecture-wise this is even wrong... So I smell a core bug here in luajit. Certainly in the number of bits it insists must be 0 (the upper 17 bits where on amd64/x86-64 it should be the upper 16 bits... and even then these may NOT be 0 if bit 47 (the upper bit of the lower 48 is 1) so the whole check is invalid... :( at least the above is at a theoretical level. i believe that the addresses divide the 48 bits into 2 chunks (thus 47)... but at the PHYSICAL level with no mmu and virtual memory. arm64 has this: https://www.kernel.org/doc/Documentation/arm64/memory.txt note in all cases the 2nd chunk of memory has at leats some upper bits of physical addresses beign 1 ... which makes luajit invalid tyo use without virtual memory remapping these away from high bits. @fix --- src/lib/eo/eo_ptr_indirection.x | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index d9bd863cc7..f4311e1c3a 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -57,6 +57,12 @@ * it to the fifo. */ +// enable this to test and use all 64bits of a pointer, otherwise limit to +// 47 bits because of luajit. it wants to check if any bits in the upper 17 are +// set for a sanity check for lightuserdata ... basically it does this: +// #define checklightudptr(L, p) (((uint64_t)(p) >> 47) ? (lj_err_msg(L, LJ_ERR_BADLU), NULL) : (p)) +//#define EO_FULL64BIT 1 + #if SIZEOF_UINTPTR_T == 4 /* 32 bits */ # define BITS_MID_TABLE_ID5 @@ -71,18 +77,33 @@ typedef int16_t Table_Index; typedef uint16_t Generation_Counter; #else +# ifndef EO_FULL64BIT +/* 47 bits */ +# define BITS_MID_TABLE_ID 11 +# define BITS_TABLE_ID 11 +# define BITS_ENTRY_ID 11 +# define BITS_GENERATION_COUNTER 10 +# define BITS_DOMAIN 2 +# define BITS_CLASS 1 +# define REF_TAG_SHIFT 46 +# define DROPPED_TABLES 2 +# define DROPPED_ENTRIES 3 +typedef int16_t Table_Index; +typedef uint16_t Generation_Counter; +# else /* 64 bits */ -# define BITS_MID_TABLE_ID 11 -# define BITS_TABLE_ID 11 -# define BITS_ENTRY_ID 11 -# define BITS_GENERATION_COUNTER 27 -# define BITS_DOMAIN 2 -# define BITS_CLASS 1 -# define REF_TAG_SHIFT 63 -# define DROPPED_TABLES 2 -# define DROPPED_ENTRIES
[EGIT] [core/efl] efl-1.20 21/45: efl-wl: immediately unset a destroyed surface's cursor
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=369c6a8949720217240f840676ef714717474215 commit 369c6a8949720217240f840676ef714717474215 Author: Mike Blumenkrantz Date: Wed Jan 17 17:33:57 2018 -0500 efl-wl: immediately unset a destroyed surface's cursor @fix --- src/lib/efl_wl/efl_wl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 50bb2ee517..6d2ee785c5 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1777,7 +1777,19 @@ comp_surface_impl_destroy(struct wl_resource *resource) { if (s->kbd.enter == cs) s->kbd.enter = NULL; if (s->ptr.enter == cs) s->ptr.enter = NULL; -if (s->ptr.cursor.surface == cs) s->ptr.cursor.surface = NULL; +if (s->ptr.cursor.surface == cs) + { + if (s->ptr.in) + { + const Eina_List *l; + Eo *dev; + Ecore_Evas *ee = ecore_evas_ecore_evas_get(s->c->evas); + EINA_LIST_FOREACH(evas_device_list(s->c->evas, s->dev), l, dev) +if (evas_device_class_get(dev) == EVAS_DEVICE_CLASS_MOUSE) + ecore_evas_cursor_device_unset(ee, dev); + } + s->ptr.cursor.surface = NULL; + } if (s->drag.surface == cs) s->drag.surface = NULL; } eina_hash_list_remove(cs->c->client_surfaces, &client, cs); --
[EGIT] [core/efl] efl-1.20 26/45: efl theme - fix bug in e init splash that would do hide anim 2x
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=e907cc3c2365d5a73796b8590cc637b69673859f commit e907cc3c2365d5a73796b8590cc637b69673859f Author: Carsten Haitzler (Rasterman) Date: Wed Jan 17 18:12:33 2018 +0900 efl theme - fix bug in e init splash that would do hide anim 2x this should fix a "go black and stay black for a bit" bug... @fix T6619 --- data/elementary/themes/edc/init.edc | 49 + 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/data/elementary/themes/edc/init.edc b/data/elementary/themes/edc/init.edc index 630b714a51..630ff20c9b 100644 --- a/data/elementary/themes/edc/init.edc +++ b/data/elementary/themes/edc/init.edc @@ -385,14 +385,13 @@ group { name: "e/init/splash"; } } programs { - program { -signal: "load"; source: ""; + program { signal: "load"; source: ""; script { set_int(is_ready, 0); set_int(do_end, 0); } } - + #define PROG(_NAME) \ program { name: _NAME"0"; \ signal: "show"; source: ""; \ @@ -460,8 +459,7 @@ group { name: "e/init/splash"; PROG("l+3") #undef PROG - program { -signal: "show"; source: ""; + program { signal: "show"; source: ""; action: STATE_SET "visible" 0.0; transition: DECELERATE 1.0; target: "shadow"; @@ -491,19 +489,16 @@ group { name: "e/init/splash"; set_int(is_ready, 1); } } - program { -signal: "e,state,done"; source: "e"; + program { signal: "e,state,done"; source: "e"; script { new val; + set_int(do_end, 1); val = get_int(is_ready); if (val == 1) run_program(PROGRAM:"exit1"); - else - set_int(do_end, 1); } } program { name: "exit1"; -signal: "e,state,done"; source: "e"; action: STATE_SET "default" 0.0; transition: SINUSOIDAL 1.0 CURRENT; target: "shadow"; @@ -520,6 +515,10 @@ group { name: "e/init/extra_screen"; images.image: "screen_circular_shadow.png" COMP; images.image: "bg_radgrad.png" COMP; images.image: "dot_pattern.png" COMP; + script { + public is_ready; + public do_end; + } parts { part { name: "clip"; type: RECT; mouse_events: 0; description { state: "default" 0.0; @@ -574,6 +573,36 @@ group { name: "e/init/extra_screen"; transition: DECELERATE 1.0; target: "shadow"; target: "blanker"; + after: "ready"; } + program { name: "ready"; +script { + new val; + val = get_int(do_end); + if (val == 1) + run_program(PROGRAM:"exit1"); + else + set_int(is_ready, 1); +} + } + program { signal: "e,state,done"; source: "e"; +script { + new val; + set_int(do_end, 1); + val = get_int(is_ready); + if (val == 1) + run_program(PROGRAM:"exit1"); +} + } + program { name: "exit1"; +action: STATE_SET "default" 0.0; +transition: SINUSOIDAL 1.0 CURRENT; +target: "shadow"; +target: "blanker"; +after: "exit2"; + } + program { name: "exit2"; +action: SIGNAL_EMIT "e,state,done_ok" "e"; + } } } --
[EGIT] [core/efl] efl-1.20 08/45: efreet: reset ipc connection after fork
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=d69a05bb0694b0b672e89105740dea8a21165ef3 commit d69a05bb0694b0b672e89105740dea8a21165ef3 Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 efreet: reset ipc connection after fork ensure that existing connection is not reused --- src/lib/efreet/efreet_cache.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c index e377b0e31f..9ede64c8dc 100644 --- a/src/lib/efreet/efreet_cache.c +++ b/src/lib/efreet/efreet_cache.c @@ -182,6 +182,22 @@ _cb_server_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) } static void +_efreet_cache_reset() +{ + const char *s; + int len = 0; + + if (ipc) ecore_ipc_server_del(ipc); + ipc = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, "efreetd", 0, NULL); + if (!ipc) return; + + s = efreet_language_get(); + if (s) len = strlen(s); + ecore_ipc_server_send(ipc, 1, 0, 0, 0, 0, s, len); + efreet_icon_extensions_refresh(); +} + +static void _icon_desktop_cache_update_event_add(int event_type) { Efreet_Event_Cache_Update *ev; @@ -333,6 +349,7 @@ efreet_cache_init(void) } } } +ecore_fork_reset_callback_add(_efreet_cache_reset, NULL); return 1; error: @@ -357,7 +374,7 @@ efreet_cache_shutdown(void) ecore_event_type_flush(EFREET_EVENT_ICON_CACHE_UPDATE, EFREET_EVENT_DESKTOP_CACHE_UPDATE, EFREET_EVENT_DESKTOP_CACHE_BUILD); - +ecore_fork_reset_callback_del(_efreet_cache_reset, NULL); IF_RELEASE(theme_name); icon_cache = efreet_cache_close(icon_cache); --
[EGIT] [core/efl] efl-1.20 27/45: elput - fix crash on shutdown where input.lib was NULL
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=a27a80689a2ca7d169bc131383b36669400620ad commit a27a80689a2ca7d169bc131383b36669400620ad Author: Carsten Haitzler (Rasterman) Date: Wed Jan 17 14:27:45 2018 +0900 elput - fix crash on shutdown where input.lib was NULL this was null checked everywhere except in 1 place. fix. now more crash on shutdown now --- src/lib/elput/elput_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 5134a67635..a154f843a9 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -411,7 +411,7 @@ _elput_input_disable(Elput_Manager *manager) EINA_LIST_FOREACH(manager->input.seats, l, seat) seat->pending_motion = 1; - libinput_suspend(manager->input.lib); + if (manager->input.lib) libinput_suspend(manager->input.lib); _process_events(&manager->input); manager->input.suspended = EINA_TRUE; } --
[EGIT] [core/efl] efl-1.20 10/45: efl-wl: unset kbd mods changed flag after sending modifiers
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=58dd14ff8898491774fe8a5d9f52a6d1acec71f7 commit 58dd14ff8898491774fe8a5d9f52a6d1acec71f7 Author: Mike Blumenkrantz Date: Wed Jan 24 16:14:23 2018 -0500 efl-wl: unset kbd mods changed flag after sending modifiers @fix --- src/lib/efl_wl/efl_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 04e6320901..b5e20f95d4 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1015,7 +1015,7 @@ comp_seat_send_modifiers(Comp_Seat *s, struct wl_resource *res, uint32_t serial) s->kbd.mods.latched, s->kbd.mods.locked, s->kbd.mods.group); - s->kbd.mods.changed = 1; + s->kbd.mods.changed = 0; } static Eina_Bool --
[EGIT] [core/efl] efl-1.20 05/45: ecore-file: make monitoring truly fork-safe
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=73280edd8f6e25a4949e7aafe8de64fddb24a002 commit 73280edd8f6e25a4949e7aafe8de64fddb24a002 Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 ecore-file: make monitoring truly fork-safe add a fork reset callback and attempt to preserve existing monitors during reset @fix --- src/lib/ecore_file/ecore_file_monitor_inotify.c | 28 + 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c index 7c8d5c9e79..97cba88c2d 100644 --- a/src/lib/ecore_file/ecore_file_monitor_inotify.c +++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c @@ -47,8 +47,27 @@ static int _ecore_file_monitor_inotify_monitor(Ecore_File_Monito static void_ecore_file_monitor_inotify_print(char *file, int mask); #endif +static Eina_Bool reseting; static Eina_Hash *monitor_hash; +static void +_ecore_file_monitor_inotify_reset() +{ + Eina_Iterator *it; + Ecore_File_Monitor *em; + Eina_Hash *h = monitor_hash; + monitor_hash = NULL; + reseting = 1; + ecore_file_monitor_backend_shutdown(); + ecore_file_monitor_backend_init(); + it = eina_hash_iterator_data_new(h); + EINA_ITERATOR_FOREACH(it, em) + _ecore_file_monitor_inotify_monitor(em, em->path); + eina_iterator_free(it); + eina_hash_free(h); + reseting = 0; +} + int ecore_file_monitor_backend_init(void) { @@ -68,6 +87,8 @@ ecore_file_monitor_backend_init(void) return 0; } + if (!reseting) + ecore_fork_reset_callback_add(_ecore_file_monitor_inotify_reset, NULL); _inotify_fd_pid = getpid(); monitor_hash = eina_hash_int32_new(NULL); return 1; @@ -91,6 +112,8 @@ ecore_file_monitor_backend_shutdown(void) eina_hash_free(monitor_hash); monitor_hash = NULL; _inotify_fd_pid = -1; + if (!reseting) + ecore_fork_reset_callback_del(_ecore_file_monitor_inotify_reset, NULL); return 1; } @@ -108,10 +131,7 @@ ecore_file_monitor_backend_add(const char *path, if (_inotify_fd_pid == -1) return NULL; if (_inotify_fd_pid != getpid()) - { -ecore_file_monitor_backend_shutdown(); -ecore_file_monitor_backend_init(); - } + _ecore_file_monitor_inotify_reset(); em = (Ecore_File_Monitor *)calloc(1, sizeof(Ecore_File_Monitor_Inotify)); if (!em) return NULL; --
[EGIT] [core/efl] efl-1.20 03/45: eio: make inotify monitors fork-safe
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=82fcb80835e298051bbe13b72e2f5c3ccbb95bca commit 82fcb80835e298051bbe13b72e2f5c3ccbb95bca Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 eio: make inotify monitors fork-safe @fix --- src/lib/eio/eio_monitor_inotify.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/lib/eio/eio_monitor_inotify.c b/src/lib/eio/eio_monitor_inotify.c index 5ff54d5066..f3a83be5b7 100644 --- a/src/lib/eio/eio_monitor_inotify.c +++ b/src/lib/eio/eio_monitor_inotify.c @@ -157,8 +157,25 @@ _eio_inotify_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh) /** * @endcond */ +static Eina_Bool reseting; +static void +_eio_monitor_reset() +{ + Eina_Hash *h = _inotify_monitors; + Eina_Iterator *it; + Eio_Monitor_Backend *backend; - + _inotify_monitors = NULL; + reseting = 1; + eio_monitor_backend_shutdown(); + eio_monitor_backend_init(); + it = eina_hash_iterator_data_new(h); + EINA_ITERATOR_FOREACH(it, backend) + eio_monitor_backend_add(backend->parent); + reseting = 0; + eina_iterator_free(it); + eina_hash_free(h); +} /** * Global * **/ @@ -189,6 +206,8 @@ void eio_monitor_backend_init(void) } _inotify_monitors = eina_hash_int32_new(_eio_inotify_del); + if (!reseting) + ecore_fork_reset_callback_add(_eio_monitor_reset, NULL); } void eio_monitor_backend_shutdown(void) @@ -207,6 +226,8 @@ void eio_monitor_backend_shutdown(void) return; close(fd); + if (!reseting) + ecore_fork_reset_callback_del(_eio_monitor_reset, NULL); } void eio_monitor_backend_add(Eio_Monitor *monitor) --
[EGIT] [core/efl] efl-1.20 02/45: eina_tiler: fix typo of rect comparing
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=1859cf0556d3c5f61de74b51e0ac9f71f3d64096 commit 1859cf0556d3c5f61de74b51e0ac9f71f3d64096 Author: Shinwoo Kim Date: Mon Feb 5 20:02:06 2018 +0900 eina_tiler: fix typo of rect comparing --- src/lib/eina/eina_tiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index 7597d1e286..e8ea2eb858 100644 --- a/src/lib/eina/eina_tiler.c +++ b/src/lib/eina/eina_tiler.c @@ -1216,7 +1216,7 @@ _rect_same(Eina_Rectangle *rec1, Eina_Rectangle *rec2) // this is ok because all the rects being compared will be aligned to 8bytes Rectangle_Same *same1 = (Rectangle_Same *)rec1; Rectangle_Same *same2 = (Rectangle_Same *)rec2; - return ((same1->x == same2->y) && (same1->y == same2->y)); + return ((same1->x == same2->x) && (same1->y == same2->y)); } EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle *r) --
[EGIT] [core/efl] efl-1.20 17/45: ecore-wl2: correctly translate spacebar keyname into key events
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=bd9adec65577de5ce30bc1e4c46e272c371b5f41 commit bd9adec65577de5ce30bc1e4c46e272c371b5f41 Author: Mike Blumenkrantz Date: Mon Jan 22 13:02:44 2018 -0500 ecore-wl2: correctly translate spacebar keyname into key events fix T6620 @fix --- src/lib/ecore_wl2/ecore_wl2_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 6f751fb9b2..7ef5a859b2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -598,7 +598,7 @@ _ecore_wl2_input_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, un /* check if we are a control code */ if (n > 0 && !( -(buffer[0] > 0x0 && buffer[0] < 0x20) || /* others 0x0 to 0x1F control codes */ +(buffer[0] > 0x0 && buffer[0] <= 0x20) || /* others 0x0 to 0x20 control codes */ buffer[0] == 0x7F)) /*delete control code */ return; --
[EGIT] [core/efl] efl-1.20 01/45: disable async mode (use sync mode) for ibus when keymap changes
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=5d8188b3fc86286341c94f703131440a2b11d9f5 commit 5d8188b3fc86286341c94f703131440a2b11d9f5 Author: Carsten Haitzler (Rasterman) Date: Wed Feb 7 01:10:42 2018 +0900 disable async mode (use sync mode) for ibus when keymap changes so scenario: 1. use ibus 2. have at least english input and japanese input (or korean etc.) 3. have 2 kbd layouts (english and greek). 4. enable "use system keyboard layout" in ibus advanced settings 5. switch to english input mode 6. switch to greek key layout 7. type and get english, not greek input as you should @fix for both terminology and elm/efl entry/ytext input. --- src/modules/ecore_imf/ibus/ibus_imcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ecore_imf/ibus/ibus_imcontext.c b/src/modules/ecore_imf/ibus/ibus_imcontext.c index caa5fd83c5..753f3b76ca 100644 --- a/src/modules/ecore_imf/ibus/ibus_imcontext.c +++ b/src/modules/ecore_imf/ibus/ibus_imcontext.c @@ -52,7 +52,7 @@ struct _KeyEvent int state; }; -static Eina_Bool _sync_mode_use = EINA_FALSE; +static Eina_Bool _sync_mode_use = EINA_TRUE; static Ecore_IMF_Context *_focus_im_context = NULL; static IBusBus *_bus = NULL; --
[EGIT] [core/efl] efl-1.20 14/45: elementary config: Fix to use ELEMENTARY_BASE_DIR for configure path
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=afeca7dda97362fada60f9944beeb94ad66f2246 commit afeca7dda97362fada60f9944beeb94ad66f2246 Author: Youngbok Shin Date: Mon Jan 22 21:01:27 2018 +0900 elementary config: Fix to use ELEMENTARY_BASE_DIR for configure path Summary: "--with-elementary-base-dir" option was ignored by recent patches on elm_config. The macro is being used in elm_theme. It should be syncronized. The default value of the macro is ".elementary". @fix Test Plan: N/A Reviewers: raster, cedric, jpeg Reviewed By: jpeg Differential Revision: https://phab.enlightenment.org/D5755 --- src/lib/elementary/elm_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index 62e5f80f01..937c9bfe76 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -626,7 +626,7 @@ _elm_config_user_dir_snprintf(char *dst, "(:config:)/elementary"); else file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, -"(:home:)/.elementary"); +"(:home:)/"ELEMENTARY_BASE_DIR); eina_strlcpy(dst, efl_vpath_file_result_get(file_obj), size); efl_del(file_obj); --
[EGIT] [core/efl] efl-1.20 24/45: efl-wl: propagate surface activation back to parent if child is hidden
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=4fc2babf5a95fc419a648825a95569fa622c654a commit 4fc2babf5a95fc419a648825a95569fa622c654a Author: Mike Blumenkrantz Date: Wed Jan 17 17:33:57 2018 -0500 efl-wl: propagate surface activation back to parent if child is hidden a toplevel child will always be stacked right above its parent @fix --- src/lib/efl_wl/efl_wl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 0dd3e060ff..e0d7a0ddf3 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -2361,7 +2361,7 @@ comp_surface_smart_show(Evas_Object *obj) static void comp_surface_smart_hide(Evas_Object *obj) { - Comp_Surface *lcs, *cs = evas_object_smart_data_get(obj); + Comp_Surface *pcs = NULL, *lcs, *cs = evas_object_smart_data_get(obj); evas_object_hide(cs->clip); cs->mapped = 0; @@ -2386,9 +2386,11 @@ comp_surface_smart_hide(Evas_Object *obj) shell_surface_send_configure(lcs); return; } +if (!cs->parent->shell.popup) + pcs = cs->parent; } if (cs->c->seats) - comp_seats_redo_enter(cs->c, NULL); + comp_seats_redo_enter(cs->c, pcs); } static void --
[EGIT] [core/efl] efl-1.20 11/45: efl-wl: fix no-op of setting keyboard enter on already-entered surface
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=c5e4d344be2b7e948b03254092e52c12f3cc19ec commit c5e4d344be2b7e948b03254092e52c12f3cc19ec Author: Mike Blumenkrantz Date: Wed Jan 24 16:13:42 2018 -0500 efl-wl: fix no-op of setting keyboard enter on already-entered surface @fix --- src/lib/efl_wl/efl_wl.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index b5e20f95d4..50bb2ee517 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1089,11 +1089,13 @@ comp_seats_redo_enter(Comp *c, Comp_Surface *cs) { Eina_List *l, *ll; struct wl_resource *res; -if (c->active_surface && (cs != c->active_surface)) +Eina_Bool same = s->kbd.enter == cs; + +if (c->active_surface && (!same)) { l = seat_kbd_active_resources_get(s); EINA_LIST_FOREACH(l, ll, res) - wl_keyboard_send_leave(res, serial, c->active_surface->res); + wl_keyboard_send_leave(res, serial, s->kbd.enter->res); } s->active_client = client; if (cs) @@ -1101,12 +1103,13 @@ comp_seats_redo_enter(Comp *c, Comp_Surface *cs) l = seat_kbd_active_resources_get(s); EINA_LIST_FOREACH(l, ll, res) { - wl_keyboard_send_enter(res, serial, cs->res, &s->kbd.keys); + if (!same) +wl_keyboard_send_enter(res, serial, cs->res, &s->kbd.keys); comp_seat_send_modifiers(s, res, serial); } } s->kbd.enter = cs; -if (s->kbd.enter && s->selection_source) +if (s->kbd.enter && s->selection_source && (!same)) comp_seat_kbd_data_device_enter(s); } c->active_surface = cs; --
[EGIT] [core/efl] efl-1.20 12/45: ecore-x: re-add implementation of ecore_x_connection_get()
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=c9ea9b861bf5a569c2302fde5ce4b29c2cccabe3 commit c9ea9b861bf5a569c2302fde5ce4b29c2cccabe3 Author: Mike Blumenkrantz Date: Wed Jan 24 16:06:29 2018 -0500 ecore-x: re-add implementation of ecore_x_connection_get() this symbol has been missing since the removal of xcb @fix --- m4/efl_find_x.m4 | 1 + src/lib/ecore_x/ecore_x.c | 7 +++ src/lib/ecore_x/ecore_x_private.h | 1 + 3 files changed, 9 insertions(+) diff --git a/m4/efl_find_x.m4 b/m4/efl_find_x.m4 index dad401fcf8..8c9f5c3677 100644 --- a/m4/efl_find_x.m4 +++ b/m4/efl_find_x.m4 @@ -120,6 +120,7 @@ AC_DEFUN([EFL_FIND_X], efl_x11_lib= fi done +efl_x11_modules="$efl_x11_modules x11-xcb" PKG_CHECK_EXISTS([$efl_x11_modules], [ diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index f54f3c30be..bcd1f7ad7c 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -2511,6 +2511,13 @@ ecore_x_default_depth_get(Ecore_X_Display *disp, return depth; } +EAPI Ecore_X_Connection * +ecore_x_connection_get(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, NULL); + return XGetXCBConnection(_ecore_x_disp); +} + EAPI void ecore_x_xkb_select_group(int group) { diff --git a/src/lib/ecore_x/ecore_x_private.h b/src/lib/ecore_x/ecore_x_private.h index 07c09fb16f..de7f853797 100644 --- a/src/lib/ecore_x/ecore_x_private.h +++ b/src/lib/ecore_x/ecore_x_private.h @@ -7,6 +7,7 @@ #endif /* ifndef MAXHOSTNAMELEN */ #include +#include #include #include #include --
[EGIT] [core/efl] efl-1.20 07/45: eldbus: make connections fork-safe
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=702e654e30b2a1aedd812e2221fef8ec3adc9bf7 commit 702e654e30b2a1aedd812e2221fef8ec3adc9bf7 Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 eldbus: make connections fork-safe after a fork, any existing connection objects can no longer be used, but it's up to the user to destroy them. internally, this prevents existing connections from ever being returned as valid connections and creates new ones after a fork also destroy fd handlers for connections to ensure that no data is accidentally clobbered before the connections are cleaned up --- src/lib/eldbus/eldbus_core.c | 65 ++-- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/src/lib/eldbus/eldbus_core.c b/src/lib/eldbus/eldbus_core.c index 91a4021010..ba4a3ba684 100644 --- a/src/lib/eldbus/eldbus_core.c +++ b/src/lib/eldbus/eldbus_core.c @@ -85,6 +85,45 @@ static void _eldbus_connection_context_event_cb_del(Eldbus_Connection_Context_Ev static void eldbus_dispatch_name_owner_change(Eldbus_Connection_Name *cn, const char *old_id); static void _eldbus_connection_free(Eldbus_Connection *conn); +static void +eldbus_fd_handler_del(Eldbus_Handler_Data *hd) +{ + if (!hd->fd_handler) return; + + DBG("free Eldbus_Handler_Data %d", hd->fd); + hd->conn->fd_handlers = eina_inlist_remove(hd->conn->fd_handlers, + EINA_INLIST_GET(hd)); + if (hd->fd_handler) + { +ecore_main_fd_handler_del(hd->fd_handler); +hd->fd_handler = NULL; + } + + free(hd); +} + +static void +_eldbus_fork_reset() +{ + int i; + + for (i =0; i < ELDBUS_CONNECTION_TYPE_LAST - 1; i++) + { +Eldbus_Connection *conn = shared_connections[i]; +if (conn) + { + Eina_Inlist *list; + Eldbus_Handler_Data *fd_handler; + + EINA_INLIST_FOREACH_SAFE(conn->fd_handlers, list, fd_handler) + dbus_watch_set_data(fd_handler->watch, NULL, NULL); + } +shared_connections[i] = NULL; + } + if (address_connections) eina_hash_free(address_connections); + address_connections = NULL; +} + EAPI int eldbus_init(void) { @@ -131,7 +170,7 @@ eldbus_init(void) if (!eldbus_object_init()) goto object_failed; if (!eldbus_proxy_init()) goto proxy_failed; if (!eldbus_service_init()) goto service_failed; - + ecore_fork_reset_callback_add(_eldbus_fork_reset, NULL); return _eldbus_init_count; service_failed: @@ -205,6 +244,7 @@ eldbus_shutdown(void) if (--_eldbus_init_count) return _eldbus_init_count; + ecore_fork_reset_callback_del(_eldbus_fork_reset, NULL); if (shared_connections[ELDBUS_CONNECTION_TYPE_SESSION - 1]) { CRI("Alive TYPE_SESSION connection"); @@ -548,24 +588,6 @@ eldbus_connection_name_object_get(Eldbus_Connection *conn, const char *name, con return eina_hash_find(cn->objects, path); } - -static void -eldbus_fd_handler_del(Eldbus_Handler_Data *hd) -{ - if (!hd->fd_handler) return; - - DBG("free Eldbus_Handler_Data %d", hd->fd); - hd->conn->fd_handlers = eina_inlist_remove(hd->conn->fd_handlers, - EINA_INLIST_GET(hd)); - if (hd->fd_handler) - { -ecore_main_fd_handler_del(hd->fd_handler); -hd->fd_handler = NULL; - } - - free(hd); -} - static Eina_Bool eldbus_fd_handler(void *data, Ecore_Fd_Handler *fd_handler) { @@ -1256,7 +1278,10 @@ _eldbus_connection_free(Eldbus_Connection *conn) if (conn->type && conn->shared) { if (conn->type == ELDBUS_CONNECTION_TYPE_ADDRESS) - eina_hash_del_by_data(address_connections, conn); + { + if (address_connections) +eina_hash_del_by_data(address_connections, conn); + } else if (shared_connections[conn->type - 1] == (void *) conn) shared_connections[conn->type - 1] = NULL; } --
[EGIT] [core/efl] efl-1.20 22/45: efl-wl: remove some broken logic for activating toplevel parents
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=cd15fb311d42d90d3e0b7d57d60bec34edce8958 commit cd15fb311d42d90d3e0b7d57d60bec34edce8958 Author: Mike Blumenkrantz Date: Wed Jan 17 17:33:57 2018 -0500 efl-wl: remove some broken logic for activating toplevel parents parents of parents should not be marked as activated...probably @fix --- src/lib/efl_wl/efl_wl.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 6d2ee785c5..841ce3d97d 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1134,12 +1134,12 @@ static void shell_surface_activate_recurse(Comp_Surface *cs) { Comp_Surface *lcs, *parent = cs->parent; - Eina_List *l, *parents = NULL; + Eina_List *parents = NULL; Eina_Inlist *i; if (parent) { -/* apply focus to toplevel in case where focus is reverted */ +/* remove focus from parents */ while (parent) { parents = eina_list_append(parents, parent); @@ -1157,14 +1157,6 @@ shell_surface_activate_recurse(Comp_Surface *cs) cs->c->surfaces = eina_inlist_promote(cs->c->surfaces, EINA_INLIST_GET(lcs)); } } - /* last item is the toplevel */ - EINA_LIST_REVERSE_FOREACH(parents, l, lcs) - { -if (lcs->shell.activated) continue; -lcs->shell.activated = 1; -if (!lcs->shell.popup) - shell_surface_send_configure(lcs); - } eina_list_free(parents); } --
[EGIT] [core/efl] efl-1.20 06/45: ecore: make dbus-using modules fork-safe
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=8f6fa066c20e0f0d27d8a75f14446215be4d0f2d commit 8f6fa066c20e0f0d27d8a75f14446215be4d0f2d Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 ecore: make dbus-using modules fork-safe reset dbus connections to ensure continued functionality --- .../ecore/system/systemd/ecore_system_systemd.c| 14 .../ecore/system/upower/ecore_system_upower.c | 26 +- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/modules/ecore/system/systemd/ecore_system_systemd.c b/src/modules/ecore/system/systemd/ecore_system_systemd.c index edc86a6642..78e3185287 100644 --- a/src/modules/ecore/system/systemd/ecore_system_systemd.c +++ b/src/modules/ecore/system/systemd/ecore_system_systemd.c @@ -249,11 +249,23 @@ _property_change_monitor(const char *name, } static void _ecore_system_systemd_shutdown(void); +static Eina_Bool _ecore_system_systemd_init(void); +static unsigned int reseting = 0; +static void +_ecore_system_systemd_reset() +{ + reseting = 1; + _ecore_system_systemd_shutdown(); + _ecore_system_systemd_init(); + reseting = 0; +} static Eina_Bool _ecore_system_systemd_init(void) { eldbus_init(); + if (!reseting) + ecore_fork_reset_callback_add(_ecore_system_systemd_reset, NULL); _log_dom = eina_log_domain_register("ecore_system_systemd", NULL); if (_log_dom < 0) @@ -296,6 +308,8 @@ _ecore_system_systemd_shutdown(void) Eldbus_Pending *pend; DBG("ecore system 'systemd' unloaded"); + if (!reseting) + ecore_fork_reset_callback_del(_ecore_system_systemd_reset, NULL); while (_proxies) { diff --git a/src/modules/ecore/system/upower/ecore_system_upower.c b/src/modules/ecore/system/upower/ecore_system_upower.c index abc621ff7a..142bebbed6 100644 --- a/src/modules/ecore/system/upower/ecore_system_upower.c +++ b/src/modules/ecore/system/upower/ecore_system_upower.c @@ -405,12 +405,26 @@ disp_error: return EINA_FALSE; } +static Eina_Bool _ecore_system_upower_init(void); +static void _ecore_system_upower_shutdown(void); +static unsigned int reseting; + +static void +_ecore_system_upower_reset() +{ + reseting = 1; + _ecore_system_upower_shutdown(); + _ecore_system_upower_init(); + reseting = 0; +} static Eina_Bool _ecore_system_upower_init(void) { Eldbus_Signal_Handler *s; eldbus_init(); + if (!reseting) + ecore_fork_reset_callback_add(_ecore_system_upower_reset, NULL); _log_dom = eina_log_domain_register("ecore_system_upower", NULL); if (_log_dom < 0) @@ -466,6 +480,8 @@ _ecore_system_upower_shutdown(void) Eldbus_Pending *pend; DBG("ecore system 'upower' unloaded"); + if (!reseting) + ecore_fork_reset_callback_del(_ecore_system_upower_reset, NULL); eldbus_name_owner_changed_callback_del(_conn, "org.freedesktop.UPower", _upower_name_owner_cb, @@ -494,6 +510,11 @@ _ecore_system_upower_shutdown(void) _obj = NULL; } + EINA_LIST_FREE(_eldbus_pending, pend) + { +eldbus_pending_cancel(pend); + } + if (_conn) { eldbus_connection_unref(_conn); @@ -506,11 +527,6 @@ _ecore_system_upower_shutdown(void) _log_dom = -1; } - EINA_LIST_FREE(_eldbus_pending, pend) - { -eldbus_pending_cancel(pend); - } - eldbus_shutdown(); } --
[EGIT] [core/efl] efl-1.20 04/45: eeze: simplify watch code and make it fork-safe
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=a36e2ebeafdc7de9203f4f42442dd58107b1770d commit a36e2ebeafdc7de9203f4f42442dd58107b1770d Author: Mike Blumenkrantz Date: Fri Feb 2 16:59:56 2018 -0500 eeze: simplify watch code and make it fork-safe avoid reads from parent process's udev fds --- src/lib/eeze/eeze_udev_watch.c | 139 ++--- 1 file changed, 73 insertions(+), 66 deletions(-) diff --git a/src/lib/eeze/eeze_udev_watch.c b/src/lib/eeze/eeze_udev_watch.c index eccd61c3d1..7245f9d0a6 100644 --- a/src/lib/eeze/eeze_udev_watch.c +++ b/src/lib/eeze/eeze_udev_watch.c @@ -11,22 +11,14 @@ #include #include "eeze_udev_private.h" +static Eina_Inlist *watches; + /* opaque */ struct Eeze_Udev_Watch { - _udev_monitor*mon; + EINA_INLIST; Ecore_Fd_Handler *handler; - Eeze_Udev_Typetype; - void *data; -}; - -/* private */ -struct _store_data -{ - void (*func)(const char *, -Eeze_Udev_Event, -void *, -Eeze_Udev_Watch *); + Eeze_Udev_Watch_Cb func; void*data; Eeze_Udev_Event event; _udev_monitor *mon; @@ -42,18 +34,17 @@ static Eina_Bool _get_syspath_from_watch(void *data, Ecore_Fd_Handler *fd_handler) { - struct _store_data *store = data; + Eeze_Udev_Watch *watch = data; _udev_device *device = NULL, *parent, *tmpdev; const char *ret, *test; - Eeze_Udev_Watch_Cb func = store->func; - void *sdata = store->data; - Eeze_Udev_Watch *watch = store->watch; + Eeze_Udev_Watch_Cb func = watch->func; + void *sdata = watch->data; int event = 0; if (!ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ)) return EINA_TRUE; - device = udev_monitor_receive_device(store->mon); + device = udev_monitor_receive_device(watch->mon); if (!device) return EINA_TRUE; @@ -62,44 +53,44 @@ _get_syspath_from_watch(void *data, || (!(ret = udev_device_get_syspath(device goto error; - if (store->event) + if (watch->event) { if (!strcmp(test, "add")) { - if ((store->event != EEZE_UDEV_EVENT_NONE) && - ((store->event & EEZE_UDEV_EVENT_ADD) != EEZE_UDEV_EVENT_ADD)) + if ((watch->event != EEZE_UDEV_EVENT_NONE) && + ((watch->event & EEZE_UDEV_EVENT_ADD) != EEZE_UDEV_EVENT_ADD)) goto error; event |= EEZE_UDEV_EVENT_ADD; } else if (!strcmp(test, "remove")) { - if ((store->event != EEZE_UDEV_EVENT_NONE) && - ((store->event & EEZE_UDEV_EVENT_REMOVE) != EEZE_UDEV_EVENT_REMOVE)) + if ((watch->event != EEZE_UDEV_EVENT_NONE) && + ((watch->event & EEZE_UDEV_EVENT_REMOVE) != EEZE_UDEV_EVENT_REMOVE)) goto error; event |= EEZE_UDEV_EVENT_REMOVE; } else if (!strcmp(test, "change")) { - if ((store->event != EEZE_UDEV_EVENT_NONE) && - ((store->event & EEZE_UDEV_EVENT_CHANGE) != EEZE_UDEV_EVENT_CHANGE)) + if ((watch->event != EEZE_UDEV_EVENT_NONE) && + ((watch->event & EEZE_UDEV_EVENT_CHANGE) != EEZE_UDEV_EVENT_CHANGE)) goto error; event |= EEZE_UDEV_EVENT_CHANGE; } else if (!strcmp(test, "online")) { - if ((store->event != EEZE_UDEV_EVENT_NONE) && - ((store->event & EEZE_UDEV_EVENT_ONLINE) != EEZE_UDEV_EVENT_ONLINE)) + if ((watch->event != EEZE_UDEV_EVENT_NONE) && + ((watch->event & EEZE_UDEV_EVENT_ONLINE) != EEZE_UDEV_EVENT_ONLINE)) goto error; event |= EEZE_UDEV_EVENT_ONLINE; } else { - if ((store->event != EEZE_UDEV_EVENT_NONE) && - ((store->event & EEZE_UDEV_EVENT_OFFLINE) != EEZE_UDEV_EVENT_OFFLINE)) + if ((watch->event != EEZE_UDEV_EVENT_NONE) && + ((watch->event & EEZE_UDEV_EVENT_OFFLINE) != EEZE_UDEV_EVENT_OFFLINE)) goto error; event |= EEZE_UDEV_EVENT_OFFLINE; @@ -108,7 +99,7 @@ _get_syspath_from_watch(void *data, if ((event & EEZE_UDEV_EVENT_OFFLINE) || (event & EEZE_UDEV_EVENT_REMOVE)) goto out; - switch (store->type) + switch (watch->type) { case EEZE_UDEV_TYPE_KEYBOARD: if ((!udev_device_get_property_value(device, "ID_INPUT_KEYBOARD")) && @@ -279,28 +270,16 @@ error: return EINA_TRUE; } -EAPI Eeze_Udev_Watch * -eeze_udev_watch_add(Eeze_Udev_Type type, -intevent, -Eeze_Udev_Watch_Cb cb, -void *user_data) +static Eina_Bool
[EGIT] [core/efl] efl-1.20 18/45: ecore_drm2: fix seat matching when checking for a device with a null seat
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=73de6d7ac724d8d99bb12d0c66e8ac943ed6ddf4 commit 73de6d7ac724d8d99bb12d0c66e8ac943ed6ddf4 Author: Chris Michael Date: Mon Jan 22 11:26:13 2018 -0500 ecore_drm2: fix seat matching when checking for a device with a null seat Summary: Check to make sure that the seat from the matching device is still null. Test Plan: Make sure that devices are not being rejected while on seat1. This depends on another patch Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: ManMower, devilhorns, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5711 --- src/lib/ecore_drm2/ecore_drm2_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 3545d1a299..e7d7afee5f 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -101,6 +101,8 @@ _drm2_device_find(Elput_Manager *em, const char *seat) Eina_Bool modeset; int fd; + EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL); + devs = eeze_udev_find_by_subsystem_sysname("drm", "card[0-9]*"); if (!devs) return NULL; @@ -114,9 +116,7 @@ _drm2_device_find(Elput_Manager *em, const char *seat) dseat = eeze_udev_syspath_get_property(dev, "ID_SEAT"); if (!dseat) dseat = eina_stringshare_add("seat0"); -if ((seat) && (strcmp(seat, dseat))) - goto cont; -else if (strcmp(dseat, "seat0")) +if (strcmp(seat, dseat)) goto cont; fd = elput_manager_open(em, dpath, -1); --
[EGIT] [core/efl] efl-1.20 09/45: elm_index: fix documentation of wrong param name
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=664c81abca6b0d8a2cbd1b5384161dab41e3b0cf commit 664c81abca6b0d8a2cbd1b5384161dab41e3b0cf Author: Sungtaek Hong Date: Mon Jan 29 21:17:26 2018 +0900 elm_index: fix documentation of wrong param name Reviewers: jpeg, woohyun, eunue, conr2d, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5767 --- src/lib/elementary/elm_index.eo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_index.eo b/src/lib/elementary/elm_index.eo index bbff132bc4..431cf4df1a 100644 --- a/src/lib/elementary/elm_index.eo +++ b/src/lib/elementary/elm_index.eo @@ -122,7 +122,7 @@ class Elm.Index (Elm.Layout, Efl.Orientation, $item will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events. - Note: If $relative is $NULL this function will behave as + Note: If $after is $NULL this function will behave as elm_index_item_append().]] return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]] @@ -151,7 +151,7 @@ class Elm.Index (Elm.Layout, Efl.Orientation, $item will be the pointer returned back on $"changed", "delay,changed" and $"selected" smart events. - Note: If $relative is $NULL this function will behave as + Note: If $before is $NULL this function will behave as elm_index_item_prepend().]] return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]] --
[EGIT] [core/efl] efl-1.20 15/45: ecore-x: add more null checks for functions
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=ebd903e08b5c0a925951920629aa2f3981cf6583 commit ebd903e08b5c0a925951920629aa2f3981cf6583 Author: Mike Blumenkrantz Date: Mon Jan 22 17:34:20 2018 -0500 ecore-x: add more null checks for functions @fix --- src/lib/ecore_x/ecore_x.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index bcd1f7ad7c..3fcf0ec279 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -979,7 +979,7 @@ ecore_x_screen_size_get(const Ecore_X_Screen *screen, LOGFN(__FILE__, __LINE__, __FUNCTION__); if (w) *w = 0; if (h) *h = 0; - if (!s) return; + EINA_SAFETY_ON_NULL_RETURN(screen); if (w) *w = s->width; if (h) *h = s->height; } @@ -1012,6 +1012,7 @@ ecore_x_screen_count_get(void) EAPI int ecore_x_screen_index_get(const Ecore_X_Screen *screen) { + EINA_SAFETY_ON_NULL_RETURN_VAL(screen, -1); return XScreenNumberOfScreen((Screen *)screen); } @@ -1866,6 +1867,7 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, int mod, int any_mod) { + EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); _ecore_x_window_button_ungrab_internal(win, button, mod, any_mod); _ecore_x_sync_magic_send(1, win, button, mod, any_mod); // _ecore_x_window_grab_remove(win, button, mod, any_mod); @@ -1970,6 +1972,7 @@ ecore_x_window_key_grab(Ecore_X_Window win, { Keygrab *t; + EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); _ecore_x_window_key_grab_internal(win, key, mod, any_mod); _ecore_key_grabs_num++; t = realloc(_ecore_key_grabs, @@ -2076,6 +2079,7 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, int mod, int any_mod) { + EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); _ecore_x_window_key_ungrab_internal(win, key, mod, any_mod); _ecore_x_sync_magic_send(2, win, XStringToKeysym(key), mod, any_mod); // _ecore_x_key_grab_remove(win, key, mod, any_mod); --
[EGIT] [core/efl] efl-1.20 13/45: ecore-x: filter XkbNewKeyboardNotifyEvent before emitting ecore-x event
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=d6d15cae198db451c0c88abfe590c298ff81cb53 commit d6d15cae198db451c0c88abfe590c298ff81cb53 Author: Mike Blumenkrantz Date: Wed Jan 24 16:01:17 2018 -0500 ecore-x: filter XkbNewKeyboardNotifyEvent before emitting ecore-x event this is only relevant to watchers of the ecore-x event if there is a keycode change @fix --- src/lib/ecore_x/ecore_x_events.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c index 11d098826e..b0f58bb09d 100644 --- a/src/lib/ecore_x/ecore_x_events.c +++ b/src/lib/ecore_x/ecore_x_events.c @@ -2671,6 +2671,11 @@ _ecore_x_event_handle_xkb(XEvent *xevent) xkbmapping = (XkbMapNotifyEvent *)xkbev; XkbRefreshKeyboardMapping(xkbmapping); } +else + { + XkbNewKeyboardNotifyEvent *xkbnkn = (void*)xkbev; + if (!(xkbnkn->changed & XkbNKN_KeycodesMask)) return; + } ecore_event_add(ECORE_X_EVENT_XKB_NEWKBD_NOTIFY, NULL, free_hash, NULL); eina_hash_add(emitted_events, &xkbev->new_kbd.serial, (void*) 1); } --
[EGIT] [core/efl] master 01/01: ecore-drm2: Ensure output changed event is sent for removed outputs
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e93f7bce307489492d6cfb7f5578a36e4142a52d commit e93f7bce307489492d6cfb7f5578a36e4142a52d Author: Chris Michael Date: Tue Feb 6 13:01:25 2018 -0500 ecore-drm2: Ensure output changed event is sent for removed outputs If an output gets disconnected, we would still like to be notified of that. In the _outputs_update function, we mark an output as disconnected by setting output->connected and output->enabled to FALSE. With this line in place (in the output_event_send function) we would never get notified if an output was disconnected. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 1d1861bd89..472c3c5f6b 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -87,8 +87,6 @@ _output_event_send(Ecore_Drm2_Output *output) { Ecore_Drm2_Event_Output_Changed *ev; - if ((!output->enabled) && (!output->connected)) return; - ev = calloc(1, sizeof(Ecore_Drm2_Event_Output_Changed)); if (!ev) return; --
[EGIT] [core/enlightenment] master 05/07: prepend input event handlers during init to ensure continued functionality
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1106bbde50e3a8374eda7b647550ed994f9f0972 commit 1106bbde50e3a8374eda7b647550ed994f9f0972 Author: Mike Blumenkrantz Date: Tue Jan 30 13:13:40 2018 -0500 prepend input event handlers during init to ensure continued functionality these handlers must always be the first to be called, so it's necessary to guarantee that they will always be first in the list of handlers --- src/bin/e_comp_canvas.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index cfe38b647..c68b18b66 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -905,12 +905,12 @@ EINTERN void e_comp_canvas_intercept(void) { ecore_event_init(); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_comp_cb_mouse_down, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_comp_cb_mouse_up, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_WHEEL, _e_comp_cb_mouse_wheel, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_comp_cb_mouse_down, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_comp_cb_mouse_up, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_MOUSE_WHEEL, _e_comp_cb_mouse_wheel, NULL); #ifdef HAVE_WAYLAND - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE, _e_comp_cb_mouse_move, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_MOUSE_MOVE, _e_comp_cb_mouse_move, NULL); #endif - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_cb_key_down, NULL); - E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _e_comp_cb_key_up, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_cb_key_down, NULL); + E_LIST_HANDLER_APPEND_PRE(handlers, ECORE_EVENT_KEY_UP, _e_comp_cb_key_up, NULL); } --
[EGIT] [core/enlightenment] master 01/07: add missing efl-wl header from mismerged commit
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=aba428d86c6286d2434107921bd77731562e786c commit aba428d86c6286d2434107921bd77731562e786c Author: Mike Blumenkrantz Date: Tue Jan 23 16:51:58 2018 -0500 add missing efl-wl header from mismerged commit ref 9a484d1b64077905e1c6cbae656f8444feedfe33 --- 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 0874cb170..d5870feb0 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -5,6 +5,7 @@ #ifdef HAVE_WL_DRM #include #endif +#include E_API int E_EVENT_TEXT_INPUT_PANEL_VISIBILITY_CHANGE = -1; static xkb_keycode_t (*_xkb_keymap_key_by_name)(void *, const char *); --
[EGIT] [core/enlightenment] master 04/07: add macro for adding a prepended event handler to a list
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ec8b606614faf05b419226e816e96a4037a9e05c commit ec8b606614faf05b419226e816e96a4037a9e05c Author: Mike Blumenkrantz Date: Tue Jan 30 13:12:32 2018 -0500 add macro for adding a prepended event handler to a list --- src/bin/e_macros.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src/bin/e_macros.h b/src/bin/e_macros.h index 44f68b6cf..1e890432e 100644 --- a/src/bin/e_macros.h +++ b/src/bin/e_macros.h @@ -100,6 +100,15 @@ list = eina_list_append(list, _eh); \ } \ while (0) +# define E_LIST_HANDLER_APPEND_PRE(list, type, callback, data) \ + do \ +{ \ + Ecore_Event_Handler *_eh; \ + _eh = ecore_event_handler_prepend(type, (Ecore_Event_Handler_Cb)callback, data); \ + assert(_eh); \ + list = eina_list_append(list, _eh); \ +} \ + while (0) # define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x)) # define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ --
[EGIT] [core/enlightenment] master 07/07: remove gadget runner function stubs for pre 1.21 compat
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5bbc335ed9911cc5e88a1e3e9d118cfc69197b64 commit 5bbc335ed9911cc5e88a1e3e9d118cfc69197b64 Author: Mike Blumenkrantz Date: Wed Jan 31 16:11:26 2018 -0500 remove gadget runner function stubs for pre 1.21 compat --- src/bin/e_gadget_runner.c | 20 1 file changed, 20 deletions(-) diff --git a/src/bin/e_gadget_runner.c b/src/bin/e_gadget_runner.c index a77ab8960..57b3b1697 100644 --- a/src/bin/e_gadget_runner.c +++ b/src/bin/e_gadget_runner.c @@ -8,26 +8,6 @@ # pragma GCC diagnostic ignored "-Wformat-truncation" #endif -#ifndef EFL_VERSION_1_21 -static void efl_wl_aspect_set(Evas_Object *obj EINA_UNUSED, Eina_Bool set EINA_UNUSED) -{ -} - -static void efl_wl_minmax_set(Evas_Object *obj EINA_UNUSED, Eina_Bool set EINA_UNUSED) -{ -} - -static void *efl_wl_global_add(Evas_Object *obj EINA_UNUSED, const void *interface EINA_UNUSED, uint32_t version EINA_UNUSED, void *data EINA_UNUSED, void *bind_cb EINA_UNUSED) -{ - return NULL; -} - -static Eina_Bool efl_wl_surface_extract(Evas_Object *surface EINA_UNUSED) -{ - return EINA_FALSE; -} -#endif - typedef enum { EXIT_MODE_RESTART, --
[EGIT] [core/enlightenment] master 02/07: resolve even more null derefs from string parsing in vkbd
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=74dd3ad3873afe3396ed9ec059a3d6a5b77d8bba commit 74dd3ad3873afe3396ed9ec059a3d6a5b77d8bba Author: Mike Blumenkrantz Date: Tue Feb 6 11:16:20 2018 -0500 resolve even more null derefs from string parsing in vkbd CID 1132747 --- src/modules/vkbd/e_kbd_int.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/modules/vkbd/e_kbd_int.c b/src/modules/vkbd/e_kbd_int.c index 277470494..218f475d7 100644 --- a/src/modules/vkbd/e_kbd_int.c +++ b/src/modules/vkbd/e_kbd_int.c @@ -1032,7 +1032,7 @@ _e_kbd_int_layout_build(E_Kbd_Int *ki) if (icon) { - char buf[PATH_MAX], *p; + char buf[PATH_MAX]; o2 = e_icon_add(e_comp->evas); e_icon_fill_inside_set(o2, 1); @@ -1042,8 +1042,7 @@ _e_kbd_int_layout_build(E_Kbd_Int *ki) evas_object_show(o2); snprintf(buf, sizeof(buf), "%s/%s", ki->layout.directory, icon); - p = strrchr(icon, '.'); - if (!strcmp(p, ".edj")) e_icon_file_edje_set(o2, buf, "icon"); + if (eina_str_has_extension(icon, ".edj")) e_icon_file_edje_set(o2, buf, "icon"); else e_icon_file_set(o2, buf); } evas_object_grid_pack(ki->layout_obj, o, @@ -1101,7 +1100,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki) { Eina_List *files; Eina_List *l; - char buf[PATH_MAX], *p, *file, *path; + char buf[PATH_MAX], *file, *path; const char *fl; Eina_List *kbs = NULL, *layouts = NULL; int ok; @@ -1117,8 +1116,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki) EINA_LIST_FREE(files, file) { -p = strrchr(file, '.'); -if ((p) && (!strcmp(p, ".kbd"))) +if (eina_str_has_extension(file, ".kbd")) { if (eina_strlcpy(buf + len, file, sizeof(buf) - len) >= sizeof(buf) - len) @@ -1138,8 +1136,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki) EINA_LIST_FREE(files, file) { -p = strrchr(file, '.'); -if ((p) && (!strcmp(p, ".kbd"))) +if (eina_str_has_extension(file, ".kbd")) { ok = 1; EINA_LIST_FOREACH(kbs, l, fl) @@ -1177,7 +1174,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki) s = strdup(ecore_file_file_get(kil->path)); if (s) { - p = strrchr(s, '.'); + char *p = strrchr(s, '.'); if (p) *p = 0; kil->name = eina_stringshare_add(s); free(s); --
[EGIT] [core/enlightenment] master 03/07: bump efl version req
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=727b1cd902e5ca86ca733791f465e7a6a1bc1000 commit 727b1cd902e5ca86ca733791f465e7a6a1bc1000 Author: Mike Blumenkrantz Date: Tue Jan 30 13:04:15 2018 -0500 bump efl version req --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 381707f06..3cdb499c6 100644 --- a/meson.build +++ b/meson.build @@ -29,7 +29,7 @@ endif e_version_rev = '.'.join([ver, git_version]) #e_version_rev = e_version -efl_version = '>= 1.20.5' +efl_version = '>= 1.20.99' release = 'ver-0.23' #for releases --
[EGIT] [core/efl] master 01/01: disable async mode (use sync mode) for ibus when keymap changes
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8a296cb90fda3102e6d28c3da53ff652000b2ab7 commit 8a296cb90fda3102e6d28c3da53ff652000b2ab7 Author: Carsten Haitzler (Rasterman) Date: Wed Feb 7 01:10:42 2018 +0900 disable async mode (use sync mode) for ibus when keymap changes so scenario: 1. use ibus 2. have at least english input and japanese input (or korean etc.) 3. have 2 kbd layouts (english and greek). 4. enable "use system keyboard layout" in ibus advanced settings 5. switch to english input mode 6. switch to greek key layout 7. type and get english, not greek input as you should @fix for both terminology and elm/efl entry/ytext input. --- src/modules/ecore_imf/ibus/ibus_imcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ecore_imf/ibus/ibus_imcontext.c b/src/modules/ecore_imf/ibus/ibus_imcontext.c index caa5fd83c5..753f3b76ca 100644 --- a/src/modules/ecore_imf/ibus/ibus_imcontext.c +++ b/src/modules/ecore_imf/ibus/ibus_imcontext.c @@ -52,7 +52,7 @@ struct _KeyEvent int state; }; -static Eina_Bool _sync_mode_use = EINA_FALSE; +static Eina_Bool _sync_mode_use = EINA_TRUE; static Ecore_IMF_Context *_focus_im_context = NULL; static IBusBus *_bus = NULL; --
[EGIT] [core/efl] master 01/01: elm: do not call "changed" callback when setting style
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b1ee35e35ce3132566244abbbd3a804167ef9c00 commit b1ee35e35ce3132566244abbbd3a804167ef9c00 Author: Shinwoo Kim Date: Tue Feb 6 22:38:14 2018 +0900 elm: do not call "changed" callback when setting style --- src/lib/elementary/efl_ui_nstate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index a555cbcd89..c83ebfc8e4 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -19,7 +19,6 @@ typedef struct } Efl_Ui_Nstate_Data; static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); -static void _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd); static const Elm_Action key_actions[] = { {"activate", _key_action_activate}, @@ -116,15 +115,13 @@ _efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state) } EOLIAN static Efl_Ui_Theme_Apply -_efl_ui_nstate_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd) +_efl_ui_nstate_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED) { Efl_Ui_Theme_Apply int_ret = EFL_UI_THEME_APPLY_FAILED; int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (!int_ret) return EFL_UI_THEME_APPLY_FAILED; - _state_active(obj, pd); - return int_ret; } --
[EGIT] [core/efl] master 01/01: efl.ui.progressbar: add checks for min & max value
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0aca43be2377c55260ef3224dc825bc41cddb1eb commit 0aca43be2377c55260ef3224dc825bc41cddb1eb Author: Amitesh Singh Date: Tue Feb 6 22:33:58 2018 +0900 efl.ui.progressbar: add checks for min & max value this improves the validity check for min & max values provided from user side. --- src/lib/elementary/efl_ui_progressbar.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index 2177cd28f6..2654b1a850 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -130,16 +130,21 @@ _val_set(Evas_Object *obj) { Eina_Bool rtl; double pos; + Efl_Ui_Progress_Status *ps; + Eina_List *l; EFL_UI_PROGRESSBAR_DATA_GET(obj, sd); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); rtl = efl_ui_mirrored_get(obj); - Efl_Ui_Progress_Status *ps; - Eina_List *l; EINA_LIST_FOREACH(sd->progress_status, l, ps) { +if (EINA_DBL_EQ(ps->val_max, ps->val_min)) + { + WRN("progressbar min and max are equal."); + continue; + } pos = (ps->val - ps->val_min)/(ps->val_max - ps->val_min); if ((!rtl && _is_inverted(sd->dir)) || @@ -478,12 +483,23 @@ _progressbar_span_size_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, Evas_Coord size } static void -_progress_part_min_max_set(Efl_Ui_Progressbar_Data *sd, const char *part_name, double min, double max) +_progress_part_min_max_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *part_name, double min, double max) { Efl_Ui_Progress_Status *ps; Eina_Bool existing_ps = EINA_FALSE; Eina_List *l; + if (EINA_DBL_EQ(min, max)) + { +ERR("min & max provided are equal."); +return; + } + + if (min > max) + { +WRN("min is greater than max."); + } + if (!strcmp(part_name, "elm.cur.progressbar")) { sd->val_min = min; @@ -507,6 +523,7 @@ _progress_part_min_max_set(Efl_Ui_Progressbar_Data *sd, const char *part_name, d ps->val_max = max; sd->progress_status = eina_list_append(sd->progress_status, ps); } +_val_set(obj); } static void @@ -622,9 +639,9 @@ _efl_ui_progressbar_pulse_get(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd) } EOLIAN static void -_efl_ui_progressbar_efl_ui_range_range_min_max_set(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd, double min, double max) +_efl_ui_progressbar_efl_ui_range_range_min_max_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, double min, double max) { - _progress_part_min_max_set(sd, "elm.cur.progressbar", min, max); + _progress_part_min_max_set(obj, sd, "elm.cur.progressbar", min, max); } EOLIAN static void @@ -679,7 +696,7 @@ _efl_ui_progressbar_part_efl_ui_range_range_min_max_set(Eo *obj, void *_pd EINA_ Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS); - _progress_part_min_max_set(sd, pd->part, min, max); + _progress_part_min_max_set(pd->obj, sd, pd->part, min, max); } EOLIAN static void --
[EGIT] [core/efl] master 01/01: efl_ui: Disable includes that don't compile
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=27c0d53f9b969bc641b3b321ce55b77230d62817 commit 27c0d53f9b969bc641b3b321ce55b77230d62817 Author: Jean-Philippe Andre Date: Tue Feb 6 21:23:45 2018 +0900 efl_ui: Disable includes that don't compile Efl.Ui.Text: The EO file contains a lot of references to legacy Elm types, which are defined in elm_general. They should be checked and moved over to efl_ui.eot if necessary. Efl.Ui.Multibuttonentry: This class was originally supposed to be based on a Model Item but as of now the API is still uncertain, so MBE itself hasn't been worked on more. Disable this from EO-only apps until its API is fixed. Ref T --- src/lib/elementary/Efl_Ui.h | 21 + src/lib/elementary/efl_ui_text.eo | 1 + 2 files changed, 22 insertions(+) diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h index d069abdcad..c53990effb 100644 --- a/src/lib/elementary/Efl_Ui.h +++ b/src/lib/elementary/Efl_Ui.h @@ -4,6 +4,14 @@ #include #include +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif + +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif + /* Standard headers for standard system calls etc. */ #include #include @@ -135,6 +143,7 @@ extern EAPI double _efl_startup_time; // EO types. Defined for legacy-only builds as legacy uses typedef of EO types. #include "efl_ui.eot.h" +#include "efl_selection_types.eot.h" //define focus manager earlier since focus object and manager is circular typedef Eo Efl_Ui_Focus_Manager; @@ -180,17 +189,29 @@ typedef Eo Efl_Ui_Focus_Manager; # include # include # include + +/* FIXME: Efl.Ui.Text must not use elm_general.h */ +# warning Efl.Ui.Text is not available yet without Elementary.h +# if 0 # include # include # include # include +# endif + # include # include # include # include # include # include + +/* FIXME: Multibuttonentry must not use elm_widget_item */ +# warning Efl.Ui.Multibutton is not available yet without Elementary.h +# if 0 # include +# endif + # include # include # include diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo index 4e65f5053c..047692b010 100644 --- a/src/lib/elementary/efl_ui_text.eo +++ b/src/lib/elementary/efl_ui_text.eo @@ -1,3 +1,4 @@ +/* FIXME - Text object must stop using elm_general! */ import elm_general; class Efl.Ui.Text (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable, --
[EGIT] [core/efl] master 01/01: ecore/evas: add NULL checks to handle argument is NULL.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=24b0ae0df5c6dc3f8de2f8a3144132d57deeef32 commit 24b0ae0df5c6dc3f8de2f8a3144132d57deeef32 Author: Hosang Kim Date: Tue Feb 6 17:58:44 2018 +0900 ecore/evas: add NULL checks to handle argument is NULL. Summary: ecore_pipe_read_fd/ecore_pipe_write_fd evas_engine_info_set/get Reviewers: woohyun, Jaehyun, Jaehyun_Cho, jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5790 --- src/lib/ecore/ecore_pipe.c | 2 ++ src/lib/evas/canvas/evas_main.c | 4 2 files changed, 6 insertions(+) diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c index f26f6bd25d..06b732b500 100644 --- a/src/lib/ecore/ecore_pipe.c +++ b/src/lib/ecore/ecore_pipe.c @@ -140,6 +140,7 @@ EAPI int ecore_pipe_read_fd(Ecore_Pipe *p) { EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID); + if (!p) return PIPE_FD_INVALID; return p->fd_read; } @@ -201,6 +202,7 @@ EAPI int ecore_pipe_write_fd(Ecore_Pipe *p) { EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID); + if (!p) return PIPE_FD_INVALID; return p->fd_write; } diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 472dc03cdb..e98577a714 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -468,6 +468,8 @@ next_zombie: EAPI Evas_Engine_Info * evas_engine_info_get(const Evas *obj) { + if (!obj) return NULL; + Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS); Efl_Canvas_Output *output; @@ -485,6 +487,8 @@ evas_engine_info_get(const Evas *obj) EAPI Eina_Bool evas_engine_info_set(Evas *obj, Evas_Engine_Info *info) { + if (!obj) return EINA_FALSE; + Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS); Efl_Canvas_Output *output; --