026c9d
Index: ibus-m17n-1.3.4/src/default.xml
026c9d
===================================================================
026c9d
--- ibus-m17n-1.3.4.orig/src/default.xml
026c9d
+++ ibus-m17n-1.3.4/src/default.xml
026c9d
@@ -184,6 +184,15 @@
026c9d
 		<name>m17n:si:samanala</name>
026c9d
 		<rank>0</rank>
026c9d
 	</engine>
026c9d
+	
026c9d
+	<engine>
026c9d
+		<name>m17n:*:inscript*</name>
026c9d
+		<layout>default[lv3:ralt_switch]</layout>
026c9d
+	</engine>
026c9d
+	<engine>
026c9d
+		<name>m17n:si:*</name>
026c9d
+		<layout>default[lv3:ralt_switch]</layout>
026c9d
+	</engine>
026c9d
 	
026c9d
 	<engine>
026c9d
 		<name>m17n:zh:cangjie</name>
026c9d
Index: ibus-m17n-1.3.4/src/m17nutil.c
026c9d
===================================================================
026c9d
--- ibus-m17n-1.3.4.orig/src/m17nutil.c
026c9d
+++ ibus-m17n-1.3.4/src/m17nutil.c
026c9d
@@ -17,7 +17,8 @@ typedef enum {
026c9d
     ENGINE_CONFIG_RANK_MASK = 1 << 0,
026c9d
     ENGINE_CONFIG_SYMBOL_MASK = 1 << 1,
026c9d
     ENGINE_CONFIG_LONGNAME_MASK = 1 << 2,
026c9d
-    ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 3
026c9d
+    ENGINE_CONFIG_LAYOUT_MASK = 1 << 3,
026c9d
+    ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 4
026c9d
 } EngineConfigMask;
026c9d
 
026c9d
 struct _EngineConfigNode {
026c9d
@@ -137,7 +138,7 @@ ibus_m17n_engine_new (MSymbol  lang,
026c9d
                                            "language",    msymbol_name (lang),
026c9d
                                            "license",     "GPL",
026c9d
                                            "icon",        engine_icon ? engine_icon : "",
026c9d
-                                           "layout",      "default",
026c9d
+                                           "layout",      config->layout ? config->layout : "default",
026c9d
                                            "rank",        config->rank,
026c9d
                                            "symbol",      config->symbol ? config->symbol : "",
026c9d
                                            "setup",       engine_setup,
026c9d
@@ -272,6 +273,8 @@ ibus_m17n_get_engine_config (const gchar
026c9d
                 config->symbol = cnode->config.symbol;
026c9d
             if (cnode->mask & ENGINE_CONFIG_LONGNAME_MASK)
026c9d
                 config->longname = cnode->config.longname;
026c9d
+            if (cnode->mask & ENGINE_CONFIG_LAYOUT_MASK)
026c9d
+                config->layout = cnode->config.layout;
026c9d
             if (cnode->mask & ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK)
026c9d
                 config->preedit_highlight = cnode->config.preedit_highlight;
026c9d
         }
026c9d
@@ -314,6 +317,12 @@ ibus_m17n_engine_config_parse_xml_node (
026c9d
             cnode->mask |= ENGINE_CONFIG_LONGNAME_MASK;
026c9d
             continue;
026c9d
         }
026c9d
+        if (g_strcmp0 (sub_node->name , "layout") == 0) {
026c9d
+            g_free (cnode->config.layout);
026c9d
+            cnode->config.layout = g_strdup (sub_node->text);
026c9d
+            cnode->mask |= ENGINE_CONFIG_LAYOUT_MASK;
026c9d
+            continue;
026c9d
+        }
026c9d
         if (g_strcmp0 (sub_node->name , "preedit-highlight") == 0) {
026c9d
             if (g_ascii_strcasecmp ("TRUE", sub_node->text) == 0)
026c9d
                 cnode->config.preedit_highlight = TRUE;
026c9d
Index: ibus-m17n-1.3.4/src/m17nutil.h
026c9d
===================================================================
026c9d
--- ibus-m17n-1.3.4.orig/src/m17nutil.h
026c9d
+++ ibus-m17n-1.3.4/src/m17nutil.h
026c9d
@@ -20,6 +20,9 @@ struct _IBusM17NEngineConfig {
026c9d
     /* overridding longname shown on panel */
026c9d
     gchar *longname;
026c9d
 
026c9d
+    /* keyboard layout */
026c9d
+    gchar *layout;
026c9d
+
026c9d
     /* whether to highlight preedit */
026c9d
     gboolean preedit_highlight;
026c9d
 };