Blame SOURCES/imsettings-xinput-xcompose.patch

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