efl_ui_flip: migrate to new focus system
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Wed, 21 Dec 2016 12:06:54 +0000 (13:06 +0100)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Thu, 20 Apr 2017 12:38:58 +0000 (14:38 +0200)
src/lib/elementary/efl_ui_flip.c

index 5e69761..fc8c3d7 100644 (file)
@@ -1792,6 +1792,8 @@ _flip_content_set(Evas_Object *obj,
         //evas_object_smart_member_add(content, obj);
         evas_object_clip_set
           (content, front ? sd->front.clip : sd->back.clip);
+        if (efl_isa(content, ELM_WIDGET_CLASS) && sd->state != front)
+          elm_widget_tree_unfocusable_set(content, EINA_TRUE);
      }
 
    // force calc to contents are the right size before transition
@@ -2012,6 +2014,13 @@ _internal_elm_flip_go_to(Evas_Object *obj,
         if (front) elm_object_focus_set(sd->front.content, EINA_TRUE);
         else elm_object_focus_set(sd->back.content, EINA_TRUE);
      }
+
+   if (sd->front.content && efl_isa(sd->front.content, ELM_WIDGET_CLASS))
+     elm_widget_tree_unfocusable_set(sd->front.content, !front);
+   if (sd->back.content && efl_isa(sd->back.content, ELM_WIDGET_CLASS))
+     elm_widget_tree_unfocusable_set(sd->back.content, front);
+
+
 }
 
 EOLIAN static void