summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-26 00:55:37 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-03-24 20:54:03 +0100
commita7c659e25833406888c7b9d431dad82c7e80b59b (patch)
treef928dac509a6d229b8eb54127ce3a173eb846f35
parentce9339a4ac3db372f2402d5803cae9fd732e7e0a (diff)
downloadenlightenment-a7c659e25833406888c7b9d431dad82c7e80b59b.tar.gz
wl: remove useless calls to e_comp_wl_input_keymap_set
those calls are not needed anymore since they will be overriden by e_xkb init which takes place a few calls later
-rw-r--r--src/bin/e_comp_wl.c39
-rw-r--r--src/modules/wl_drm/e_mod_main.c36
-rw-r--r--src/modules/wl_wl/e_mod_main.c2
-rw-r--r--src/modules/wl_x11/e_mod_main.c56
4 files changed, 0 insertions, 133 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 5c2a786525..69a698b5a1 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2393,45 +2393,6 @@ _e_comp_wl_compositor_create(void)
ERR("Could not initialize input");
goto input_err;
}
-
-#ifndef HAVE_WAYLAND_ONLY
- if (e_comp_util_has_x())
- {
- E_Config_XKB_Layout *ekbd;
- Ecore_X_Atom xkb = 0;
- Ecore_X_Window root = 0;
- int len = 0;
- unsigned char *dat;
- char *rules = NULL, *model = NULL, *layout = NULL;
-
- if ((ekbd = e_xkb_layout_get()))
- {
- model = strdup(ekbd->model);
- layout = strdup(ekbd->name);
- }
-
- root = ecore_x_window_root_first_get();
- xkb = ecore_x_atom_get("_XKB_RULES_NAMES");
- ecore_x_window_prop_property_get(root, xkb, ECORE_X_ATOM_STRING,
- 1024, &dat, &len);
- if ((dat) && (len > 0))
- {
- rules = (char *)dat;
- dat += strlen((const char *)dat) + 1;
- if (!model) model = strdup((const char *)dat);
- dat += strlen((const char *)dat) + 1;
- if (!layout) layout = strdup((const char *)dat);
- }
-
- /* fallback */
- if (!rules) rules = strdup("evdev");
- if (!model) model = strdup("pc105");
- if (!layout) layout = strdup("us");
-
- /* update compositor keymap */
- e_comp_wl_input_keymap_set(rules, model, layout, NULL, NULL, NULL, NULL);
- }
-#endif
e_comp_wl->wl.client_disp = ecore_wl2_display_connect(NULL);
/* setup module idler to load shell mmodule */
diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index 00e1a86288..f85770140a 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -693,32 +693,10 @@ _drm_read_pixels(E_Comp_Wl_Output *output, void *pixels)
}
}
-static void
-_e_mod_drm_keymap_set(struct xkb_context *ctx, struct xkb_keymap *map)
-{
- struct xkb_rule_names names;
-
- ctx = xkb_context_new(0);
- EINA_SAFETY_ON_NULL_RETURN(ctx);
-
- memset(&names, 0, sizeof(names));
- names.rules = strdup("evdev");
- names.model = strdup("pc105");
- names.layout = strdup("us");
-
- map = xkb_map_new_from_names(ctx, &names, 0);
- EINA_SAFETY_ON_NULL_RETURN(map);
-
- ecore_drm_device_keyboard_cached_context_set(ctx);
- ecore_drm_device_keyboard_cached_keymap_set(map);
-}
-
E_API void *
e_modapi_init(E_Module *m)
{
int w = 0, h = 0;
- struct xkb_context *ctx = NULL;
- struct xkb_keymap *map = NULL;
printf("LOAD WL_DRM MODULE\n");
@@ -729,8 +707,6 @@ e_modapi_init(E_Module *m)
/* return NULL; */
/* } */
- _e_mod_drm_keymap_set(ctx, map);
-
if (e_comp_config_get()->engine == E_COMP_ENGINE_GL)
{
e_comp->ee = ecore_evas_new("gl_drm", 0, 0, 1, 1, NULL);
@@ -780,18 +756,6 @@ e_modapi_init(E_Module *m)
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
e_comp->pointer->color = EINA_TRUE;
- /* FIXME: We need a way to trap for user changing the keymap inside of E
- * without the event coming from X11 */
-
- /* FIXME: We should make a decision here ...
- *
- * Fetch the keymap from drm, OR set this to what the E config is....
- */
-
- /* FIXME: This is just for testing at the moment....
- * happens to jive with what drm does */
- e_comp_wl_input_keymap_set(NULL, NULL, NULL, NULL, NULL, ctx, map);
-
activate_handler =
ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE,
_e_mod_drm_cb_activate, NULL);
diff --git a/src/modules/wl_wl/e_mod_main.c b/src/modules/wl_wl/e_mod_main.c
index 6040aa996b..a00c584655 100644
--- a/src/modules/wl_wl/e_mod_main.c
+++ b/src/modules/wl_wl/e_mod_main.c
@@ -72,8 +72,6 @@ e_modapi_init(E_Module *m)
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
e_comp->pointer->color = EINA_TRUE;
- e_comp_wl_input_keymap_set(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x,
&e_comp_wl->ptr.y);
evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c
index c38694e343..45eff1390b 100644
--- a/src/modules/wl_x11/e_mod_main.c
+++ b/src/modules/wl_x11/e_mod_main.c
@@ -11,54 +11,6 @@ _cb_delete_request(Ecore_Evas *ee EINA_UNUSED)
ecore_main_loop_quit();
}
-static Eina_Bool
-_cb_keymap_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Config_XKB_Layout *ekbd;
- char *rules = NULL, *model = NULL, *layout = NULL;
- Ecore_X_Atom xkb = 0;
- Ecore_X_Window root = 0;
- int len = 0;
- unsigned char *dat;
-
- printf("KEYMAP CHANGED\n");
-
- /* try to fetch the E keyboard layout */
- if ((ekbd = e_xkb_layout_get()))
- {
- model = strdup(ekbd->model);
- layout = strdup(ekbd->name);
- }
-
- /* NB: we need a 'rules' so fetch from X atoms */
- root = ecore_x_window_root_first_get();
- xkb = ecore_x_atom_get("_XKB_RULES_NAMES");
- ecore_x_window_prop_property_get(root, xkb, ECORE_X_ATOM_STRING,
- 1024, &dat, &len);
- if ((dat) && (len > 0))
- {
- rules = (char *)dat;
- dat += strlen((const char *)dat) + 1;
- if (!model) model = strdup((const char *)dat);
- dat += strlen((const char *)dat) + 1;
- if (!layout) layout = strdup((const char *)dat);
- }
-
- /* fallback */
- if (!rules) rules = strdup("evdev");
- if (!model) model = strdup("pc105");
- if (!layout) layout = strdup("us");
-
- /* update compositor keymap */
- e_comp_wl_input_keymap_set(rules, model, layout, NULL, NULL);
-
- free(rules);
- free(model);
- free(layout);
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
E_API void *
e_modapi_init(E_Module *m)
{
@@ -97,14 +49,6 @@ e_modapi_init(E_Module *m)
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
e_comp->pointer->color = EINA_TRUE;
- /* force a keymap update so compositor keyboard gets setup */
- _cb_keymap_changed(e_comp->wl_comp_data, 0, NULL);
-
- /* setup keymap_change event handler */
- kbd_hdlr =
- ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY,
- _cb_keymap_changed, e_comp->wl_comp_data);
-
return m;
}