From: Jihoon Kim <jihoon48.kim@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 26 Jul 2011 12:04:27 +0000 (12:04 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 26 Jul 2011 12:04:27 +0000 (12:04 +0000)
Subject: Re: [E-devel] [Patch] Add XIM module for ecore_imf

Patch to set the right window ID for IMF access from Edje

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@61756 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/edje_entry.c
src/lib/edje_private.h

index e897f07..21fd8c7 100644 (file)
@@ -266,6 +266,7 @@ PKG_CHECK_MODULES([EDJE],
     eet >= 1.4.0
     evas >= 1.0.999
     ecore >= 1.0.0
+    ecore-evas >= 1.0.0
     ecore-file >= 1.0.0
     embryo >= 1.0.0
    ])
@@ -273,7 +274,7 @@ PKG_CHECK_MODULES([EDJE],
 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
 
-requirement_edje="embryo >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.4.0 eina >= 1.0.0 ${requirement_edje}"
+requirement_edje="embryo >= 1.0.0 ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.4.0 eina >= 1.0.0 ${requirement_edje}"
 requirement_edje="${requirement_lua} ${requirement_edje}"
 
 have_ecore_imf="no"
index 0d10cf6..0837366 100644 (file)
@@ -1960,7 +1960,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
 
         if (!en->imf_context) goto done;
 
-        ecore_imf_context_client_window_set(en->imf_context, rp->object);
+        ecore_imf_context_client_window_set(en->imf_context, ecore_evas_window_get(ecore_evas_ecore_evas_get(rp->edje->base.evas)));
         ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->base.evas);
 
         ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
@@ -2897,6 +2897,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *
    if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
 
    ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos);
+   if (!preedit_string) return ECORE_CALLBACK_PASS_ON;
 
    if (!strcmp(preedit_string, ""))
      preedit_end_state = EINA_TRUE;
index 4bd65ad..985c82f 100644 (file)
@@ -52,6 +52,7 @@ void *alloca (size_t);
 #include <Eet.h>
 #include <Evas.h>
 #include <Ecore.h>
+#include <Ecore_Evas.h>
 #include <Ecore_File.h>
 #ifdef HAVE_ECORE_IMF
 # include <Ecore_IMF.h>