summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-02-03 15:47:32 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2015-02-03 15:48:36 +0900
commita3e0ebf41f2723b5516cce760d46592940bab53b (patch)
tree1e5f9d97e6d9e307b3e5c9fc160c805e8e162d87
parent17a63524c08b6fc400b16cbb0acd8a32fe7e7bba (diff)
list/genlist/gengrid/toolbar: set focus/unfocus on item when focus is actually set on widget.
Summary: @Fix Reviewers: raster, Hermet, seoz Reviewed By: seoz Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1918
-rw-r--r--src/lib/elm_gengrid.c9
-rw-r--r--src/lib/elm_genlist.c9
-rw-r--r--src/lib/elm_list.c6
-rw-r--r--src/lib/elm_toolbar.c6
4 files changed, 28 insertions, 2 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 9f951f72b..f6506f5a2 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3411,6 +3411,9 @@ _elm_gengrid_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
3411 if (!elm_object_focus_get(obj)) 3411 if (!elm_object_focus_get(obj))
3412 elm_object_focus_set(obj, EINA_TRUE); 3412 elm_object_focus_set(obj, EINA_TRUE);
3413 3413
3414 if (!elm_widget_focus_get(obj))
3415 return;
3416
3414 if (eo_it != sd->focused_item) 3417 if (eo_it != sd->focused_item)
3415 { 3418 {
3416 if (sd->focused_item) 3419 if (sd->focused_item)
@@ -3423,7 +3426,11 @@ _elm_gengrid_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
3423 } 3426 }
3424 } 3427 }
3425 else 3428 else
3426 _elm_gengrid_item_unfocused(eo_it); 3429 {
3430 if (!elm_widget_focus_get(obj))
3431 return;
3432 _elm_gengrid_item_unfocused(eo_it);
3433 }
3427} 3434}
3428 3435
3429EOLIAN static Eina_Bool 3436EOLIAN static Eina_Bool
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index e242f8222..13cb1ed9e 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5711,6 +5711,9 @@ _elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
5711 if (!elm_object_focus_get(obj)) 5711 if (!elm_object_focus_get(obj))
5712 elm_object_focus_set(obj, EINA_TRUE); 5712 elm_object_focus_set(obj, EINA_TRUE);
5713 5713
5714 if (!elm_widget_focus_get(obj))
5715 return;
5716
5714 if (eo_it != sd->focused_item) 5717 if (eo_it != sd->focused_item)
5715 { 5718 {
5716 if (sd->focused_item) 5719 if (sd->focused_item)
@@ -5723,7 +5726,11 @@ _elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
5723 } 5726 }
5724 } 5727 }
5725 else 5728 else
5726 _elm_genlist_item_unfocused(eo_it); 5729 {
5730 if (!elm_widget_focus_get(obj))
5731 return;
5732 _elm_genlist_item_unfocused(eo_it);
5733 }
5727} 5734}
5728 5735
5729EOLIAN static Eina_Bool 5736EOLIAN static Eina_Bool
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index f9b405efc..709e00efc 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -2121,6 +2121,10 @@ _elm_list_item_elm_widget_item_focus_set(Eo *eo_it, Elm_List_Item_Data *it, Eina
2121 sd->last_focused_item = eo_it; 2121 sd->last_focused_item = eo_it;
2122 if (!elm_object_focus_get(obj)) 2122 if (!elm_object_focus_get(obj))
2123 elm_object_focus_set(obj, EINA_TRUE); 2123 elm_object_focus_set(obj, EINA_TRUE);
2124
2125 if (!elm_widget_focus_get(obj))
2126 return;
2127
2124 if (eo_it != sd->focused_item) 2128 if (eo_it != sd->focused_item)
2125 { 2129 {
2126 if (sd->focused_item) 2130 if (sd->focused_item)
@@ -2130,6 +2134,8 @@ _elm_list_item_elm_widget_item_focus_set(Eo *eo_it, Elm_List_Item_Data *it, Eina
2130 } 2134 }
2131 else 2135 else
2132 { 2136 {
2137 if (!elm_widget_focus_get(obj))
2138 return;
2133 if (eo_it) 2139 if (eo_it)
2134 _elm_list_item_unfocused(eo_it); 2140 _elm_list_item_unfocused(eo_it);
2135 } 2141 }
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 94320d33d..650819349 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -827,6 +827,10 @@ _elm_toolbar_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Toolbar_Item_Data *it
827 sd->last_focused_item = eo_it; 827 sd->last_focused_item = eo_it;
828 if (!elm_object_focus_get(obj)) 828 if (!elm_object_focus_get(obj))
829 elm_object_focus_set(obj, EINA_TRUE); 829 elm_object_focus_set(obj, EINA_TRUE);
830
831 if (!elm_widget_focus_get(obj))
832 return;
833
830 if (eo_it != sd->focused_item) 834 if (eo_it != sd->focused_item)
831 { 835 {
832 if (sd->focused_item) 836 if (sd->focused_item)
@@ -836,6 +840,8 @@ _elm_toolbar_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Toolbar_Item_Data *it
836 } 840 }
837 else 841 else
838 { 842 {
843 if (!elm_widget_focus_get(obj))
844 return;
839 if (eo_it) 845 if (eo_it)
840 _elm_toolbar_item_unfocused(eo_it); 846 _elm_toolbar_item_unfocused(eo_it);
841 } 847 }