aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-11 08:43:52 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-11 08:46:29 +0900
commit81d6713324cb7a784ae163610e45758b3fc40e54 (patch)
tree6ecb03741b81b2a38cae6015a5608cba29c86270 /src/lib/ecore_imf
parenteldbus: do not ignore numeric "0" in property_set (diff)
downloadefl-81d6713324cb7a784ae163610e45758b3fc40e54.tar.gz
ecore-imf - fix broken state on non-x11 environments
this fixes ecore-imf to auto-pick scim or wayland vased in DISPLAY and WALAND_DISPLAY env vars. it's not a perfect/good/correct fix. it should be picking based on canvas engine type, but that is a far more invasive effort, so for release, do this simple one that brings back wayland input panel and keeps x11 input methods going as long as app is either x11 (DISPLAY) or wayland (WAYLAND_DISPLAY). if both are set, it'll get it wrong. as i said - that's a more invasive fix.
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/ecore_imf_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index 3dbe5274e5..8a0cf1face 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -71,6 +71,13 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
if (strcmp(id, "none") == 0) return NULL;
if (ecore_imf_module_get(id)) return id;
}
+ else
+ {
+ if (getenv("DISPLAY")) id = "scim";
+ else if (getenv("WAYLAND_DISPLAY")) id = "wayland";
+ if (ecore_imf_module_get(id)) return id;
+ return NULL;
+ }
modules = ecore_imf_module_available_get();
if (!modules) return NULL;