summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ecore_x/ecore_x_events.c32
-rw-r--r--src/lib/efl_wl/efl_wl.c2
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
2047_ecore_x_event_handle_mapping_notify(XEvent *xevent) 2047_ecore_x_event_handle_mapping_notify(XEvent *xevent)
2048{ 2048{
2049 Ecore_X_Event_Mapping_Change *e; 2049 Ecore_X_Event_Mapping_Change *e;
2050 static unsigned long last_serial;
2051 int type;
2050 2052
2051 _ecore_x_last_event_mouse_move = 0; 2053 _ecore_x_last_event_mouse_move = 0;
2052 2054
2053 _ecore_x_window_grab_suspend();
2054 _ecore_x_key_grab_suspend();
2055
2056 XRefreshKeyboardMapping((XMappingEvent *)xevent);
2057 _ecore_x_modifiers_get();
2058
2059 _ecore_x_window_grab_resume();
2060 _ecore_x_key_grab_resume();
2061 e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change));
2062 if (!e) return;
2063 switch (xevent->xmapping.request) 2055 switch (xevent->xmapping.request)
2064 { 2056 {
2065 case MappingModifier: 2057 case MappingModifier:
2066 e->type = ECORE_X_MAPPING_MODIFIER; 2058 type = ECORE_X_MAPPING_MODIFIER;
2067 break; 2059 break;
2068 2060
2069 case MappingKeyboard: 2061 case MappingKeyboard:
2070 e->type = ECORE_X_MAPPING_KEYBOARD; 2062 if ((last_serial && (xevent->xmapping.serial == last_serial))) return;
2063 type = ECORE_X_MAPPING_KEYBOARD;
2064 last_serial = xevent->xmapping.serial;
2071 break; 2065 break;
2072 2066
2073 case MappingPointer: 2067 case MappingPointer:
2074 default: 2068 default:
2075 e->type = ECORE_X_MAPPING_MOUSE; 2069 type = ECORE_X_MAPPING_MOUSE;
2076 break; 2070 break;
2077 } 2071 }
2072
2073 _ecore_x_window_grab_suspend();
2074 _ecore_x_key_grab_suspend();
2075
2076 XRefreshKeyboardMapping((XMappingEvent *)xevent);
2077 _ecore_x_modifiers_get();
2078
2079 _ecore_x_window_grab_resume();
2080 _ecore_x_key_grab_resume();
2081 e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change));
2082 if (!e) return;
2083 e->type = type;
2078 e->keycode = xevent->xmapping.first_keycode; 2084 e->keycode = xevent->xmapping.first_keycode;
2079 e->num = xevent->xmapping.count; 2085 e->num = xevent->xmapping.count;
2080 ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL); 2086 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)
5355 if (gl) gl = strdup(gl); 5355 if (gl) gl = strdup(gl);
5356 setenv("ELM_ACCEL", "gl", 1); 5356 setenv("ELM_ACCEL", "gl", 1);
5357 } 5357 }
5358 exe = ecore_exe_run(cmd, c); 5358 exe = ecore_exe_pipe_run(cmd, ECORE_EXE_TERM_WITH_PARENT, c);
5359 if (disp) setenv("DISPLAY", disp, 1); 5359 if (disp) setenv("DISPLAY", disp, 1);
5360 if (env) setenv("WAYLAND_DISPLAY", env, 1); 5360 if (env) setenv("WAYLAND_DISPLAY", env, 1);
5361 else unsetenv("WAYLAND_DISPLAY"); 5361 else unsetenv("WAYLAND_DISPLAY");