Fix bug preedit changed event was called in mouse down and focus-in event 24/159124/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Nov 2017 06:03:26 +0000 (15:03 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Nov 2017 06:04:27 +0000 (15:04 +0900)
Even though preedit was not changed, preedit changed event was called.

Change-Id: Idc5d7f22bff56bbf454c1f2aa4ef6c4a6a460328
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/wayland_immodule/wayland_imcontext.c

index c5e80f5..b7da7c1 100644 (file)
@@ -1878,8 +1878,10 @@ text_input_preedit_cursor(void                 *data,
 {
     WaylandIMContext *imcontext = (WaylandIMContext *)data;
 
-    imcontext->pending_preedit.cursor = index;
-    _preedit_cursor_changed = EINA_TRUE;
+    if (imcontext->pending_preedit.cursor != index) {
+        imcontext->pending_preedit.cursor = index;
+        _preedit_cursor_changed = EINA_TRUE;
+    }
 }
 
 static xkb_mod_index_t