summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2017-12-05 17:57:44 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 18:35:31 +0900
commit93492bcc3b466404d8c7df2e4fc205aa842f0d67 (patch)
treef8c03a928c3a350576188159cc9e40364e1aa386
parentf5001ca4f9d697beae396c6dde82dc95bfbb56b1 (diff)
elm_widget: simplify _eval_registration_candidate
Test Plan: make check Reviewers: bu5hm4n, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5588
-rw-r--r--src/lib/elementary/elm_widget.c55
1 files changed, 14 insertions, 41 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 7c0289ec24..6b9f920a48 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -391,49 +391,22 @@ _eval_registration_candidate(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool *shou
391{ 391{
392 *should = *want_full = EINA_FALSE; 392 *should = *want_full = EINA_FALSE;
393 393
394 //can focus can be overridden by the following properties
395 if (!efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS) ||
396 (!pd->parent_obj) ||
397 (_tree_unfocusable(obj)) ||
398 (_tree_disabled(obj)) ||
399 (!evas_object_visible_get(obj)))
400 return;
401
394 if (pd->can_focus) 402 if (pd->can_focus)
395 { 403 {
396 *should = EINA_TRUE; 404 *should = *want_full = EINA_TRUE;
397 //can focus can be overridden by the following properties 405 }
398 406 else if (pd->logical.child_count > 0)
399 if (!efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS)) 407 {
400 *should = EINA_FALSE; 408 *should = EINA_TRUE;
401 409 }
402 if (!pd->parent_obj)
403 *should = EINA_FALSE;
404
405 if (_tree_unfocusable(obj))
406 *should = EINA_FALSE;
407
408 if (_tree_disabled(obj))
409 *should = EINA_FALSE;
410
411 if (!evas_object_visible_get(obj))
412 *should = EINA_FALSE;
413
414 if (*should)
415 *want_full = EINA_TRUE;
416 }
417
418 if (!*should && pd->logical.child_count > 0)
419 {
420 *should = EINA_TRUE;
421
422 if (!efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS))
423 *should = EINA_FALSE;
424
425 if (!pd->parent_obj)
426 *should = EINA_FALSE;
427
428 if (_tree_unfocusable(obj))
429 *should = EINA_FALSE;
430
431 if (_tree_disabled(obj))
432 *should = EINA_FALSE;
433
434 if (!evas_object_visible_get(obj))
435 *should = EINA_FALSE;
436 }
437} 410}
438 411
439static void 412static void