return priv->connection;
}
+gboolean
+ibus_connection_read_write_dispatch (IBusConnection *connection,
+ gint timeout)
+{
+ IBusConnectionPrivate *priv;
+ priv = IBUS_CONNECTION_GET_PRIVATE (connection);
+
+ return dbus_connection_read_write_dispatch (priv->connection, timeout);
+}
+
typedef struct _VTableCallData {
IBusMessageFunc message_func;
gpointer user_data;
IBusConnectionPrivate *priv;
priv = IBUS_CONNECTION_GET_PRIVATE (connection);
- return dbus_connection_send_with_reply (priv->connection,
- message,
- pending_return,
- timeout_milliseconds);
+ gboolean retval;
+
+ retval = dbus_connection_send_with_reply (priv->connection,
+ message,
+ pending_return,
+ timeout_milliseconds);
+
+ return retval;
}
IBusMessage *
void ibus_connection_close (IBusConnection *connection);
gboolean ibus_connection_is_connected (IBusConnection *connection);
DBusConnection *ibus_connection_get_connection (IBusConnection *connection);
+gboolean ibus_connection_read_write_dispatch(IBusConnection *connection,
+ gint timeout);
gboolean ibus_connection_send (IBusConnection *connection,
IBusMessage *message);
gboolean ibus_connection_send_signal (IBusConnection *connection,
}
/* wait reply or timeout */
- ibus_pending_call_wait (pending);
+ IBusConnection *connection = ibus_proxy_get_connection ((IBusProxy *) context);
+ while (!ibus_pending_call_get_completed (pending)) {
+ ibus_connection_read_write_dispatch (connection, -1);
+ }
reply_message = ibus_pending_call_steal_reply (pending);
ibus_pending_call_unref (pending);