diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2014-10-02 10:31:26 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2014-10-06 08:31:53 +0900 |
commit | 2cd9c45d1ff96ac90d7ccdeb225ca515567e67eb (patch) | |
tree | ce76db0112cb89dfe7892ba99e4ce33280778640 | |
parent | 139d01007975706badaa662c9d66d5653d1c7277 (diff) | |
download | efl-2cd9c45d1ff96ac90d7ccdeb225ca515567e67eb.tar.gz |
ecore_imf/scim: fix candidate word window position issue
In case application window locates in top left position,
The candidate word window provided by scim could overlap the position of entry widget when typing Chinese and Japanese.
-rw-r--r-- | src/modules/ecore_imf/scim/scim_imcontext.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/modules/ecore_imf/scim/scim_imcontext.cpp b/src/modules/ecore_imf/scim/scim_imcontext.cpp index 3e4b9fc604..bd088f9e3a 100644 --- a/src/modules/ecore_imf/scim/scim_imcontext.cpp +++ b/src/modules/ecore_imf/scim/scim_imcontext.cpp @@ -894,6 +894,7 @@ isf_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int cx, int cy, int Ecore_Evas *ee; int canvas_x, canvas_y; int new_cursor_x, new_cursor_y; + Ecore_X_Window client_win = 0; if (cw == 0 && ch == 0) return; @@ -901,21 +902,21 @@ isf_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int cx, int cy, int if (context_scim != _focused_ic) return; - if (context_scim->impl->client_canvas) - { - ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas); - if (!ee) return; - - ecore_evas_geometry_get(ee, &canvas_x, &canvas_y, NULL, NULL); - } + if (context_scim->impl->client_window) + client_win = context_scim->impl->client_window; else { - if (context_scim->impl->client_window) - window_to_screen_geometry_get(context_scim->impl->client_window, &canvas_x, &canvas_y); - else - return; + if (context_scim->impl->client_canvas) + { + ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas); + + if (ee) + client_win = (Ecore_X_Window)ecore_evas_window_get(ee); + } } + window_to_screen_geometry_get(client_win, &canvas_x, &canvas_y); + new_cursor_x = canvas_x + cx; new_cursor_y = canvas_y + cy + ch; |