| Index: chromeos_input_method.cc
|
| diff --git a/chromeos_input_method.cc b/chromeos_input_method.cc
|
| index 0c8571ca56a3347e96c4b9a4d7218f8a311a8754..9b6b962f3c1f4e0a0f97168575f74cb03003822e 100644
|
| --- a/chromeos_input_method.cc
|
| +++ b/chromeos_input_method.cc
|
| @@ -535,21 +535,7 @@ class InputMethodStatusConnection {
|
|
|
| // Initializes IBus and DBus connections.
|
| bool Init() {
|
| - // Establish IBus connection between ibus-daemon to retrieve the list of
|
| - // available input method engines, change the current input method engine,
|
| - // and so on.
|
| ibus_init();
|
| - ibus_ = ibus_bus_new();
|
| -
|
| - // Check the IBus connection status.
|
| - if (!ibus_) {
|
| - LOG(ERROR) << "ibus_bus_new() failed";
|
| - return false;
|
| - }
|
| - if (!ibus_bus_is_connected(ibus_)) {
|
| - DLOG(INFO) << "ibus_bus_is_connected() failed";
|
| - return false;
|
| - }
|
|
|
| // Establish a DBus connection between the candidate_window process for
|
| // Chromium OS to handle signals (e.g. "FocusIn") from the process.
|
| @@ -584,6 +570,21 @@ class InputMethodStatusConnection {
|
| G_CALLBACK(DBusProxyDestroyCallback),
|
| this);
|
|
|
| + // Establish IBus connection between ibus-daemon to retrieve the list of
|
| + // available input method engines, change the current input method engine,
|
| + // and so on.
|
| + ibus_ = ibus_bus_new();
|
| +
|
| + // Check the IBus connection status.
|
| + if (!ibus_) {
|
| + LOG(ERROR) << "ibus_bus_new() failed";
|
| + return false;
|
| + }
|
| + if (!ibus_bus_is_connected(ibus_)) {
|
| + DLOG(INFO) << "ibus_bus_is_connected() failed";
|
| + return false;
|
| + }
|
| +
|
| // Register the callback function for IBusBus signals.
|
| g_signal_connect(ibus_,
|
| "disconnected",
|
|
|