Change set_use_system_keyboard_layout() timing.
authorfujiwarat <takao.fujiwara1@gmail.com>
Thu, 7 Mar 2013 04:16:10 +0000 (13:16 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Thu, 7 Mar 2013 04:16:10 +0000 (13:16 +0900)
Call set_use_system_keyboard_layout() before update_engines() is called
in panel.vala because update_engines() calls switch_engine().

BUG=http://code.google.com/p/ibus/issues/detail?id=1558#c43

Review URL: https://codereview.appspot.com/7559043

ui/gtk3/panel.vala

index 9f6e5e3..18ef5c0 100644 (file)
@@ -299,12 +299,14 @@ class Panel : IBus.PanelService {
             m_config.watch("general/hotkey", "triggers");
             m_config.watch("panel", "custom_font");
             m_config.watch("panel", "use_custom_font");
+            // Update m_use_system_keyboard_layout before update_engines()
+            // is called.
+            set_use_system_keyboard_layout(null);
             update_engines(m_config.get_value("general", "preload_engines"),
                            m_config.get_value("general", "engines_order"));
             unbind_switch_shortcut();
             bind_switch_shortcut(null);
             set_switcher_delay_time(null);
-            set_use_system_keyboard_layout(null);
         } else {
             update_engines(null, null);
         }