summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-26 01:06:57 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-03-24 20:54:03 +0100
commit7cfb6f3d3f5ce9f9e908daaa040184216d705d2e (patch)
tree280ecf5a93b426e0edd3d253df795d908a76475e
parenta7c659e25833406888c7b9d431dad82c7e80b59b (diff)
downloadenlightenment-7cfb6f3d3f5ce9f9e908daaa040184216d705d2e.tar.gz
e_comp_wl: remove useless params from keymap_set
-rw-r--r--src/bin/e_comp_wl_input.c38
-rw-r--r--src/bin/e_comp_wl_input.h3
-rw-r--r--src/bin/e_xkb.c4
3 files changed, 18 insertions, 27 deletions
diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index 3d12e8da30..3ff60996a4 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -605,36 +605,30 @@ e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled)
}
E_API void
-e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout, const char *variant, const char *options, struct xkb_context *dflt_ctx, struct xkb_keymap *dflt_map)
+e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout, const char *variant, const char *options)
{
struct xkb_keymap *keymap;
struct xkb_rule_names names;
- Eina_Bool use_dflt_xkb = EINA_FALSE;
/* DBG("COMP_WL: Keymap Set: %s %s %s", rules, model, layout); */
- if (dflt_ctx && dflt_map) use_dflt_xkb = EINA_TRUE;
-
/* assemble xkb_rule_names so we can fetch keymap */
- if (!use_dflt_xkb)
- {
- memset(&names, 0, sizeof(names));
+ memset(&names, 0, sizeof(names));
- if (rules) names.rules = rules;
- else names.rules = "evdev";
+ if (rules) names.rules = rules;
+ else names.rules = "evdev";
- if (model) names.model = model;
- else names.model = "pc105";
+ if (model) names.model = model;
+ else names.model = "pc105";
- if (layout) names.layout = layout;
- else names.layout = "us";
+ if (layout) names.layout = layout;
+ else names.layout = "us";
- if (variant) names.variant = variant;
- else names.variant = NULL;
+ if (variant) names.variant = variant;
+ else names.variant = NULL;
- if (options) names.options = options;
- else names.options = NULL;
- }
+ if (options) names.options = options;
+ else names.options = NULL;
/* unreference any existing context */
if (e_comp_wl->xkb.context)
@@ -642,8 +636,7 @@ e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *lay
/* create a new xkb context */
- if (use_dflt_xkb) e_comp_wl->xkb.context = dflt_ctx;
- else e_comp_wl->xkb.context = xkb_context_new(0);
+ e_comp_wl->xkb.context = xkb_context_new(0);
#ifdef HAVE_WL_DRM
if (e_config->xkb.use_cache)
@@ -651,13 +644,12 @@ e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *lay
#endif
/* fetch new keymap based on names */
- if (use_dflt_xkb) keymap = dflt_map;
- else keymap = xkb_map_new_from_names(e_comp_wl->xkb.context, &names, 0);
+ keymap = xkb_map_new_from_names(e_comp_wl->xkb.context, &names, 0);
if (!keymap)
{
ERR("Failed to compile keymap");
- NULL;
+ return;
}
/* update compositor keymap */
diff --git a/src/bin/e_comp_wl_input.h b/src/bin/e_comp_wl_input.h
index e6df151dc5..9f7e40a22e 100644
--- a/src/bin/e_comp_wl_input.h
+++ b/src/bin/e_comp_wl_input.h
@@ -29,8 +29,7 @@ E_API void e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled);
E_API void e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled);
E_API void e_comp_wl_input_touch_enabled_set(Eina_Bool enabled);
-E_API void e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout, const char *variant, const char *options,
- struct xkb_context *dflt_ctx, struct xkb_keymap *dflt_map);
+E_API void e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout, const char *variant, const char *options);
E_API void e_comp_wl_input_keyboard_event_generate(const char *key, int mods, Eina_Bool up);
# endif
diff --git a/src/bin/e_xkb.c b/src/bin/e_xkb.c
index 861bce4674..36a7ac9ee4 100644
--- a/src/bin/e_xkb.c
+++ b/src/bin/e_xkb.c
@@ -267,8 +267,8 @@ _e_wl_xkb_update(int cur_group)
e_config->xkb.default_model,
eina_strbuf_string_get(layouts), //pool of layouts to use
eina_strbuf_string_get(variants), //pool of variants to use
- eina_strbuf_string_get(options), //list of options
- NULL, NULL);
+ eina_strbuf_string_get(options) //list of options
+ );
e_config->xkb.cur_group = cur_group;
_e_xkb_update_event(cur_group);