From d288bc99a73110be8ddf2823b91f77300111b651 Mon Sep 17 00:00:00 2001 From: Li Zhang Date: Sat, 6 Feb 2016 14:06:59 +0800 Subject: [PATCH] Add text_input_id argument for activate event Change-Id: If305f2b47d465bc3b942c42bba61f92b3fd97b08 --- ism/extras/efl_wsc/isf_wsc_efl.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ism/extras/efl_wsc/isf_wsc_efl.cpp b/ism/extras/efl_wsc/isf_wsc_efl.cpp index 219f0ef..70d81ce 100644 --- a/ism/extras/efl_wsc/isf_wsc_efl.cpp +++ b/ism/extras/efl_wsc/isf_wsc_efl.cpp @@ -71,7 +71,6 @@ using namespace scim; #define LOG_TAG "ISF_WSC_EFL" static struct weescim _wsc = {0}; -static int _context_count = 0; ///////////////////////////////////////////////////////////////////////////// @@ -399,7 +398,7 @@ static const struct wl_keyboard_listener wsc_im_keyboard_listener = { }; static void -_wsc_im_activate(void *data, struct wl_input_method *input_method, struct wl_input_method_context *im_ctx) +_wsc_im_activate(void *data, struct wl_input_method *input_method, struct wl_input_method_context *im_ctx, uint32_t text_input_id) { struct weescim *wsc = (weescim*)data; if (!wsc) return; @@ -414,10 +413,7 @@ _wsc_im_activate(void *data, struct wl_input_method *input_method, struct wl_inp delete wsc_ctx; return; } - if (_context_count == 0) { - _context_count = getpid () % 50000; - } - wsc_ctx->id = _context_count++; + wsc_ctx->id = text_input_id; wsc->wsc_ctx = wsc_ctx; wsc_ctx->ctx = wsc; wsc_ctx->state = NULL; -- 2.7.4