discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=72e9d604a36d18aa18740323ddcbd99f6f9bf8a7
commit 72e9d604a36d18aa18740323ddcbd99f6f9bf8a7 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Sep 22 09:54:37 2017 -0400 ecore-x: reject successive MappingNotify events if they are identical in some cases loading an xmodmap on enlightenment startup can trigger an infinite number of identical events which hard locks the xserver for a very, very long time @fix --- src/lib/ecore_x/ecore_x_events.c | 32 +++++++++++++++++++------------- src/lib/efl_wl/efl_wl.c | 2 +- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c index acd0d67176..11d098826e 100644 --- a/src/lib/ecore_x/ecore_x_events.c +++ b/src/lib/ecore_x/ecore_x_events.c @@ -2047,34 +2047,40 @@ void _ecore_x_event_handle_mapping_notify(XEvent *xevent) { Ecore_X_Event_Mapping_Change *e; + static unsigned long last_serial; + int type; _ecore_x_last_event_mouse_move = 0; - _ecore_x_window_grab_suspend(); - _ecore_x_key_grab_suspend(); - - XRefreshKeyboardMapping((XMappingEvent *)xevent); - _ecore_x_modifiers_get(); - - _ecore_x_window_grab_resume(); - _ecore_x_key_grab_resume(); - e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change)); - if (!e) return; switch (xevent->xmapping.request) { case MappingModifier: - e->type = ECORE_X_MAPPING_MODIFIER; + type = ECORE_X_MAPPING_MODIFIER; break; case MappingKeyboard: - e->type = ECORE_X_MAPPING_KEYBOARD; + if ((last_serial && (xevent->xmapping.serial == last_serial))) return; + type = ECORE_X_MAPPING_KEYBOARD; + last_serial = xevent->xmapping.serial; break; case MappingPointer: default: - e->type = ECORE_X_MAPPING_MOUSE; + type = ECORE_X_MAPPING_MOUSE; break; } + + _ecore_x_window_grab_suspend(); + _ecore_x_key_grab_suspend(); + + XRefreshKeyboardMapping((XMappingEvent *)xevent); + _ecore_x_modifiers_get(); + + _ecore_x_window_grab_resume(); + _ecore_x_key_grab_resume(); + e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change)); + if (!e) return; + e->type = type; e->keycode = xevent->xmapping.first_keycode; e->num = xevent->xmapping.count; ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL); diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 5c317141af..8a1a7c2b7c 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -5355,7 +5355,7 @@ efl_wl_run(Evas_Object *obj, const char *cmd) if (gl) gl = strdup(gl); setenv("ELM_ACCEL", "gl", 1); } - exe = ecore_exe_run(cmd, c); + exe = ecore_exe_pipe_run(cmd, ECORE_EXE_TERM_WITH_PARENT, c); if (disp) setenv("DISPLAY", disp, 1); if (env) setenv("WAYLAND_DISPLAY", env, 1); else unsetenv("WAYLAND_DISPLAY"); --