From 02e72cdd3673c65d4217ea19fab7aa2fdfd449f6 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 14 Jun 2011 16:10:23 +0900 Subject: [PATCH] Proclaim we will use surrounding-text, in enable(). --- src/engine.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/engine.c b/src/engine.c index 60816b0..b68b13e 100644 --- a/src/engine.c +++ b/src/engine.c @@ -697,6 +697,16 @@ ibus_m17n_engine_enable (IBusEngine *engine) IBusM17NEngine *m17n = (IBusM17NEngine *) engine; parent_class->enable (engine); + +#ifdef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT + /* Issue a dummy ibus_engine_get_surrounding_text() call to tell + input context that we will use surrounding-text. */ + IBusText *text; + guint cursor_pos; + + ibus_engine_get_surrounding_text (engine, &text, &cursor_pos); + g_object_unref (text); +#endif /* HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */ } static void -- 1.7.5.2