elm_slider: fix focus for legacy slider on tizen 55/214255/2
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 19 Sep 2019 09:05:02 +0000 (18:05 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 19 Sep 2019 12:22:41 +0000 (12:22 +0000)
@tizen fix

Change-Id: Ib8ed3bae13dbc34937d4d88db7fba0b4a56f2e9e
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/lib/elementary/elm_slider.c

index 2170081..faf8745 100644 (file)
@@ -252,7 +252,11 @@ _popup_hide(void *data,
 
    if (sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) return;
    if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) &&
+   /* TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
        efl_ui_focus_object_focus_get(data))
+   */
+       elm_widget_focus_get(data))
+   /* END */
      return;
 
    edje_object_signal_emit(sd->popup, "popup,hide", "elm"); // XXX: for compat
@@ -274,7 +278,11 @@ _popup_hide_done(void *data,
    ELM_SLIDER_DATA_GET(data, sd);
    if (sd->popup)
      {
+        /* TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
         if (!((efl_ui_focus_object_focus_get(data)) &&
+        */
+        if (!((elm_widget_focus_get(data)) &&
+        /* END */
               (sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
           {
              evas_object_hide(sd->popup);
@@ -283,7 +291,11 @@ _popup_hide_done(void *data,
      }
    if (sd->popup2)
      {
+        /*TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
         if (!((efl_ui_focus_object_focus_get(data)) &&
+        */
+        if (!((elm_widget_focus_get(data)) &&
+        /* END */
               (sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
           {
              evas_object_hide(sd->popup2);
@@ -485,7 +497,11 @@ _drag_start(void *data,
             const char *emission EINA_UNUSED,
             const char *source EINA_UNUSED)
 {
+   /*TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
    if (!efl_ui_focus_object_focus_get(data))
+   */
+   if (!elm_widget_focus_get(data))
+   /* END */
      elm_object_focus_set(data, EINA_TRUE);
    _slider_update(data, EINA_TRUE);
    evas_object_smart_callback_call(data, SIG_DRAG_START, NULL);
@@ -947,7 +963,11 @@ _spacer_down_cb(void *data,
           }
      }
 
+   /* TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
    if (!efl_ui_focus_object_focus_get(data))
+   */
+   if (!elm_widget_focus_get(data))
+   /* END */
      elm_object_focus_set(data, EINA_TRUE);
 
    _slider_update(data, EINA_TRUE);
@@ -1273,9 +1293,17 @@ _elm_slider_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Slider_Data *sd)
 
    int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS));
 
+   /* TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
    if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && efl_ui_focus_object_focus_get(obj))
+   */
+   if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && elm_widget_focus_get(obj))
+   /* END */
      _popup_show(obj, NULL, NULL, NULL);
+   /* TIZEN_ONLY(20190919): fix focus for legacy slider on tizen
    else if (!efl_ui_focus_object_focus_get(obj))
+   */
+   else if (!elm_widget_focus_get(obj))
+   /* END */
      _popup_hide(obj, NULL, NULL, NULL);
 
    return int_ret;