scim-immodule: fix bug candidate window covers the preedit string when preedit string...
authorjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 27 Mar 2012 09:05:00 +0000 (09:05 +0000)
committerjihoon <jihoon@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 27 Mar 2012 09:05:00 +0000 (09:05 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@69664 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/modules/immodules/scim/scim_imcontext.cpp

index 5af4d48..9365222 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * 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.
+
index 2426475..5b01cbd 100644 (file)
@@ -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();