Hey, raster.

Like you told me, there is some problem that the candidate word window is
located on the wrong position
when ecore_imf works with xim immodule.

To solve this problem, I've tried to make the patch file, but it does not
work well at this moment.

I've made this patch referring to gtk xim module.
I've tested with GTK application, but GTK application also have same
problem.

This patch should be applied after applying the patch I sent
(http://www.mail-archive.com/[email protected]/msg33
889.html)

If you have the XIM knowledge, would you please let me know the solution?

Index: ecore_imf_xim.c
===================================================================
--- ecore_imf_xim.c     (revision 61754)
+++ ecore_imf_xim.c     (working copy)
@@ -332,7 +332,38 @@ _ecore_imf_context_xim_use_preedit_set(Ecore_IMF_C
 #endif
 }
 
+static void
+_ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context   *ctx,
+                                            int x, int y, int w __UNUSED__, 
int h)
+{
+   EINA_LOG_DBG("%s in", __FUNCTION__);
+
 #ifdef ENABLE_XIM
+   Ecore_IMF_Context_Data *imf_context_data;
+   XIC ic;
+   XVaNestedList preedit_attr;
+   XPoint        spot;
+
+   imf_context_data = ecore_imf_context_data_get(ctx);
+   ic = imf_context_data->ic;
+   if (!ic)
+     return;
+
+   spot.x = x;
+   spot.y = y + h;
+
+   preedit_attr = XVaCreateNestedList (0,
+                                       XNSpotLocation, &spot,
+                                       NULL);
+   XSetICValues (ic,
+                 XNPreeditAttributes, preedit_attr,
+                 NULL);
+
+   XFree(preedit_attr);
+#endif
+}
+
+#ifdef ENABLE_XIM
 static unsigned int
 _ecore_x_event_reverse_modifiers(unsigned int state)
 {
@@ -585,7 +616,7 @@ static Ecore_IMF_Context_Class xim_class = {
    .input_panel_layout_get = NULL,
    .input_panel_language_set = NULL,
    .input_panel_language_get = NULL,
-   .cursor_location_set = NULL,
+   .cursor_location_set = _ecore_imf_context_xim_cursor_location_set,
 };
 
 static Ecore_IMF_Context *

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to