Support preedit none style 68/215768/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 15 Oct 2019 12:07:14 +0000 (21:07 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 15 Oct 2019 12:07:14 +0000 (21:07 +0900)
Change-Id: I1d4ad178495e1a00492112500918c4e22b56061b
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/wayland_immodule/wayland_imcontext.c
ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index 7309061..0990a23 100644 (file)
@@ -1993,7 +1993,7 @@ text_input_preedit_styling(void                 *data,
     switch (style)
     {
         case WL_TEXT_INPUT_PREEDIT_STYLE_DEFAULT:
-            attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB1;
+            attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_NONE;
             break;
         case WL_TEXT_INPUT_PREEDIT_STYLE_UNDERLINE:
             attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB1;
index db19c03..bf267d3 100644 (file)
@@ -1879,7 +1879,7 @@ wsc_send_preedit_style (WSCContextISF* wsc_ctx)
                          i != wsc_ctx->impl->preedit_attrlist.end (); ++i) {
                         start_index = i->get_start ();
                         end_index = i->get_end ();
-                        if (end_index <= wlen && start_index < end_index && i->get_type () != SCIM_ATTR_DECORATE_NONE) {
+                        if (end_index <= wlen && start_index < end_index) {
                             start_index = g_utf8_offset_to_pointer (mbs.c_str (), i->get_start ()) - mbs.c_str ();
                             end_index = g_utf8_offset_to_pointer (mbs.c_str (), i->get_end ()) - mbs.c_str ();
                             if (i->get_type () == SCIM_ATTR_DECORATE) {
@@ -1911,13 +1911,14 @@ wsc_send_preedit_style (WSCContextISF* wsc_ctx)
                                         break;
                                 }
 
-                                if (preedit_style)
-                                  wl_input_method_context_preedit_styling (wsc_ctx->im_ctx,
-                                                                           start_index,
-                                                                           end_index,
-                                                                           preedit_style);
+                                wl_input_method_context_preedit_styling (wsc_ctx->im_ctx,
+                                                                         start_index,
+                                                                         end_index,
+                                                                         preedit_style);
+
                                 switch (i->get_value ())
                                 {
+                                    case SCIM_ATTR_DECORATE_NONE:
                                     case SCIM_ATTR_DECORATE_UNDERLINE:
                                     case SCIM_ATTR_DECORATE_REVERSE:
                                     case SCIM_ATTR_DECORATE_HIGHLIGHT: