From 90dfafb0df1ef3c21ec5cbcb3f789ea772d6f40a Mon Sep 17 00:00:00 2001 From: jihoon Date: Tue, 27 Mar 2012 09:05:00 +0000 Subject: [PATCH] scim-immodule: fix bug candidate window covers the preedit string when preedit string appears in 2 line. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@69664 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 5 +++++ src/modules/immodules/scim/scim_imcontext.cpp | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5af4d48..9365222 100644 --- a/ChangeLog +++ b/ChangeLog @@ -600,3 +600,8 @@ * Implement popup windows * Implement ecore_wl_window_transparent_set function * Implement function to allow setting Ecore_Wl_Window type. + +2012-03-26 Jihoon Kim (jihoon) + + * scim-immodule: fix bug candidate window covers the preedit string when preedit string appears in 2 line. + diff --git a/src/modules/immodules/scim/scim_imcontext.cpp b/src/modules/immodules/scim/scim_imcontext.cpp index 2426475..5b01cbd 100644 --- a/src/modules/immodules/scim/scim_imcontext.cpp +++ b/src/modules/immodules/scim/scim_imcontext.cpp @@ -1014,16 +1014,13 @@ isf_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int cx, int cy, int EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); Ecore_Evas *ee; int canvas_x, canvas_y; + int new_cursor_x, new_cursor_y; if (cw == 0 && ch == 0) return; if (context_scim && context_scim->impl && context_scim == _focused_ic) { - // Don't update spot location while updating preedit string. - if (context_scim->impl->preedit_updating) - return; - if (context_scim->impl->client_canvas) { ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas); @@ -1039,10 +1036,17 @@ isf_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int cx, int cy, int return; } - if (context_scim->impl->cursor_x != canvas_x + cx || context_scim->impl->cursor_y != canvas_y + cy + ch) + new_cursor_x = canvas_x + cx; + new_cursor_y = canvas_y + cy + ch; + + // Don't update spot location while updating preedit string. + if (context_scim->impl->preedit_updating && (context_scim->impl->cursor_y == new_cursor_y)) + return; + + if (context_scim->impl->cursor_x != new_cursor_x || context_scim->impl->cursor_y != new_cursor_y) { - context_scim->impl->cursor_x = canvas_x + cx; - context_scim->impl->cursor_y = canvas_y + cy + ch; + context_scim->impl->cursor_x = new_cursor_x; + context_scim->impl->cursor_y = new_cursor_y; _panel_client.prepare(context_scim->id); panel_req_update_spot_location(context_scim); _panel_client.send(); -- 2.7.4