Blame SOURCES/imsettings-xinput-xcompose.patch

29947e
diff -pruN imsettings-1.6.1.orig/data/xinput.sh.in.in imsettings-1.6.1/data/xinput.sh.in.in
29947e
--- imsettings-1.6.1.orig/data/xinput.sh.in.in	2013-04-03 19:23:22.000000000 +0900
29947e
+++ imsettings-1.6.1/data/xinput.sh.in.in	2013-04-03 19:23:50.000000000 +0900
29947e
@@ -53,9 +53,10 @@ if [ -r "$USER_XINPUTRC" -a "x$IMSETTING
29947e
     fi
29947e
 elif [ -r "$SYS_XINPUTRC" ]; then
29947e
     # FIXME: This hardcoded list has to be gone in the future.
29947e
-    _language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
29947e
+    # Locales that normally use input-method for native input
29947e
+    _im_language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
29947e
     _sourced_xinputrc=0
29947e
-    for i in $_language_list; do
29947e
+    for i in $_im_language_list; do
29947e
         if echo $tmplang | grep -q -E "^$i"; then
29947e
             source "$SYS_XINPUTRC"
29947e
             READ_XINPUTRC=$SYS_XINPUTRC
29947e
@@ -63,6 +64,19 @@ elif [ -r "$SYS_XINPUTRC" ]; then
29947e
             break
29947e
         fi
29947e
     done
29947e
+    # Locales that usually use X locale compose
29947e
+    # FIXME: which other locales should be included here?
29947e
+    if [ $_sourced_xinputrc -eq 0 ]; then
29947e
+        _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
29947e
+        for i in $_xcompose_language_list; do
29947e
+            if echo $tmplang | grep -q -E "^$i"; then
29947e
+                source @XINPUT_PATH@/xcompose.conf
29947e
+                READ_XINPUTRC=@XINPUT_PATH@/xcompose.conf
29947e
+                _sourced_xinputrc=1
29947e
+                break
29947e
+            fi
29947e
+        done
29947e
+    fi
29947e
     if [ $_sourced_xinputrc -eq 0 ]; then
29947e
         # Read none.conf to set up properly for locales not listed the above.
29947e
         source @XINPUT_PATH@/none.conf