Disable surrounding-text when retrieve-surrounding signal is not handled in GTK.
authorDaiki Ueno <ueno@unixuser.org>
Wed, 30 Nov 2011 00:40:15 +0000 (09:40 +0900)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 30 Nov 2011 00:40:15 +0000 (09:40 +0900)
BUG=https://code.google.com/p/ibus/issues/detail?id=1358
TEST=On Fedora with ibus-m17n tis820

Review URL: http://codereview.appspot.com/5431086

client/gtk2/ibusimcontext.c

index b6ca12e..5ae5cfc 100644 (file)
@@ -278,6 +278,11 @@ _request_surrounding_text (IBusIMContext *context)
         IDEBUG ("requesting surrounding text");
         g_signal_emit (context, _signal_retrieve_surrounding_id, 0,
                        &return_value);
+        if (!return_value) {
+            context->caps &= ~IBUS_CAP_SURROUNDING_TEXT;
+            ibus_input_context_set_capabilities (context->ibuscontext,
+                                                 context->caps);
+        }
     }
 }