if (!wsc || !wsc->wsc_ctx) return;
isf_wsc_context_input_panel_show (wsc->wsc_ctx);
+ wsc->wsc_ctx->input_panel_shown = true;
+#if ENABLE_REMOTE_INPUT
+ remote_surrounding_get (wsc->wsc_ctx);
+#endif
}
static void
if (!wsc || !wsc->wsc_ctx) return;
isf_wsc_context_input_panel_hide (wsc->wsc_ctx);
+ wsc->wsc_ctx->input_panel_shown = false;
}
static const struct wl_input_method_listener wsc_im_listener = {
if (!conv_text)
return;
- if ((!context_scim->impl->init_remote_surrounding_text || strcmp (conv_text, text) != 0 || context_scim->impl->cursor_pos != cursor)) {
+ if (!context_scim->impl->init_remote_surrounding_text || strcmp (conv_text, text) != 0 || context_scim->impl->cursor_pos != cursor) {
SECURE_LOGD("remote surrounding text : \"%s\"\n", text);
context_scim->impl->surrounding_text = utf8_mbstowcs (String (text));
context_scim->impl->cursor_pos = cursor;
#if ENABLE_REMOTE_INPUT
- String _text(text);
- g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
-#endif
-
+ if (context_scim->input_panel_shown && context_scim->impl->input_resource != INPUT_RESOURCE_REMOTE) {
+ String _text(text);
+ g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
+ context_scim->impl->init_remote_surrounding_text = true;
+ }
+#else
context_scim->impl->init_remote_surrounding_text = true;
+#endif
}
free (conv_text);
}
if (!context_scim->impl->init_remote_entry_metadata || (context_scim->impl->input_hint != hint || context_scim->impl->panel_layout != layout ||
context_scim->impl->variation != variation || context_scim->impl->autocapital_type != type ||
context_scim->impl->return_key_disabled != return_key_disabled)) {
+ if (context_scim->impl->panel_layout != layout || context_scim->impl->variation != variation) {
+ if (context_scim->impl->input_resource == INPUT_RESOURCE_REMOTE)
+ context_scim->impl->input_resource = INPUT_RESOURCE_NONE;
+ }
+
context_scim->impl->input_hint = hint;
context_scim->impl->panel_layout = layout;
context_scim->impl->variation = variation;