From 98c7bdc5d92d5d2f25eb5f81fe90397664c2d435 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Fri, 20 Sep 2013 10:58:34 +0900 Subject: [PATCH] Fix no output when ibus-daemon is running on another display. Using ssh -X or another display, the hostname and display numbers can be different between the GTK clients and ibus-daemon. This patch fixes the output: "Events queue growing too big, will start to drop." BUG=RH#1004135 TEST=clients/gtk*/im-ibus.so Review URL: https://codereview.appspot.com/13707046 --- client/gtk2/ibusimcontext.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c index b6fe2c0..eef062c 100644 --- a/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c @@ -492,7 +492,13 @@ daemon_name_appeared (GDBusConnection *connection, const gchar *owner, gpointer data) { - _daemon_is_running = TRUE; + /* If ibus-daemon is running and run ssh -X localhost, + * daemon_name_appeared() is called but ibus_get_address() == NULL + * because the hostname and display number are different between + * ibus-daemon and clients. So IBusBus would not be connected and + * ibusimcontext->ibuscontext == NULL and ibusimcontext->events_queue + * could go beyond MAX_QUEUED_EVENTS . */ + _daemon_is_running = (ibus_get_address () != NULL); } static void -- 2.7.4