Page MenuHomePhabricator

Elm focus unreachable widgets
Closed, WontfixPublic

Description

In this scenario:

I expect using elm_object_focus_next(root_obj, RIGHT or UP) the focus to move to the top-right buttons,
but nothing happend with current/new focus implementation.
The 3 buttons are thus unreachable

Also the behaviour changed too much (IMO) from last stable release.

DaveMDS created this task.Nov 30 2017, 11:55 AM
bu5hm4n raised the priority of this task from Normal to High.EditedNov 30 2017, 1:06 PM
bu5hm4n added a subscriber: woohyun.

Yeah, @woohyun was also talking about that to me.

I am not too sure what we should do about that... :(

I will work on a proposal next week

Propsoal:

We are doing the scanning for the relations [Right, Left, Top, Down] twice.
Once with the behaviour of now, and once with the behaviour that the nearest element (nearest by 2D distance) in the direction of the relation will taken, illustrated sample:


What do you think?

ok, the latest commit make it (quite) work.

There are now 2 remaining issues:

  1. I have to click at least once in one of the three buttons to give it the focus, otherwise the focus always stay in the genlist. Once clicked the focus move correctly between the genlist and the buttons.
  2. The genlist always show the focus hilight (blue rect) also when the focus is on the buttons:
YOhoho added a subscriber: YOhoho.Dec 20 2017, 3:05 PM

I wrote a new test in elm_test (Focus 6), it is pratically the same layout of my mediacenter and it have similar issues.

Please also give a look at the test code there is another bug (commented out) that need to be fixed.

@DaveMDS can you recheck ? The normal test should work now as expected i guess.

(There might still be the case of a weird highlight arround a wrong widget, i still have to dig into that what that is, but at least keystrokes are working correctly)

Will dig into the commented out stuff.

what I need to check? I cannot see any commit from you in master nor in any branch of yours...

current master still broken as before

are you the drunken one that forgot to push? or I'm the drunken one that cannot find your fix?

Haha!

I committed the fix a few days ago, and forgot to comment. on my system i can switch between The button and the genlist ...

As per today irc discussion:

Currently the only way to make the focus-test-6 works is:

start the test, click on btn, click on genlist, click in btn, click on genlist... focus now works as expected.

So no, the suff you committed some days ago did not fixed the test case.

...me waiting for a real fix.

Some update on this: I just added the ability in test_focus6 to move the focus by API, that is what I'm doing in EpyMC, but it works as expected in the test so... this is not my issue :(

in the meantime I discovered another bug in the test, to reproduce:

  1. elementary_test -to "focus 6"
  2. press DOWN on the keyboard at least 6 times (so that the focus is now on Item #2)
  3. press UP on the keyboard 3 times (to move the focus back on buttons)

as you can see 3 times is not enough to go back to the buttons, you need to press UP again some more times to focus the buttons. The same happend moving the focus with the bottom buttons, numbers are a bit different in this case (because items are not focused) but you can see the same odd behaviour.

bu5hm4n closed this task as Resolved.Mar 29 2018, 1:12 AM

I think this was done ?

well, I still have the random jumping when scrolling long lists...

DaveMDS reopened this task as Open.Apr 2 2018, 3:00 AM

Re-opening this... as I found 2 new issue:

First issue:

  1. ENTER to go in the UI test activity
  2. BACKSPACE to go back in mainmenu
  3. LEFT-LEFT-etc and ENTER on the Configuration section
  4. boom! The ui is now frozen and spinning 100% cpu. Seems we are in an infinite loop.

Second issue:

  1. ENTER to go in the UI test activity
  2. move a bit between the buttons (focusing all the 3) and the genlist
  3. BACKSPACE to go back in mainmenu
  4. LEFT-LEFT-etc and ENTER on the Configuration section
  5. you can see the genlist and the 3 buttons highlighted at the same time!

Well, all of this is not a unfocusable widget ... Rather a new issue ... Also the 100% CPU issue, where does it spin ?

when it freeze I see this last error:

EFL ERROR Focusable 0x4000001325df (Elm.Genlist.Item) not registered in manager 0x400000140351

and I catched this backtrace from gdb:

EFL ERROR Focusable 0x4000001c71cc (Elm.Genlist.Item) not registered in manager 0x4000000e2d5e
^C
Thread 1 "python" received signal SIGINT, Interrupt.
0x00007ffff5698412 in eina_log_print_unlocked (domain=75, level=EINA_LOG_LEVEL_DBG, file=0x7fffe671eac0 "lib/elementary/efl_ui_focus_manager_calc.c", fnc=0x7fffe671f420 <__FUNCTION__.57453> "_request_subchild", line=1535,
    fmt=0x7fffe671ec53 "Found node %p", args=0x7fffffffc760) at lib/eina/eina_log.c:1385
1385    {
(gdb) bt full
#0  0x00007ffff5698412 in eina_log_print_unlocked (domain=75, level=EINA_LOG_LEVEL_DBG, file=0x7fffe671eac0 "lib/elementary/efl_ui_focus_manager_calc.c", fnc=0x7fffe671f420 <__FUNCTION__.57453> "_request_subchild", line=1535, fmt=0x7fffe671ec53 "Found node %p", args=0x7fffffffc760) at lib/eina/eina_log.c:1385
        d = <optimized out>
#1  0x00007ffff5699813 in eina_log_print (domain=75, level=level@entry=EINA_LOG_LEVEL_DBG, file=file@entry=0x7fffe671eac0 "lib/elementary/efl_ui_focus_manager_calc.c", fnc=fnc@entry=0x7fffe671f420 <__FUNCTION__.57453> "_request_subchild", line=line@entry=1535, fmt=fmt@entry=0x7fffe671ec53 "Found node %p") at lib/eina/eina_log.c:2259
        args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffffffc870, reg_save_area = 0x7fffffffc780}}
#2  0x00007fffe66c264e in _request_subchild (node=<optimized out>) at lib/elementary/efl_ui_focus_manager_calc.c:1535
        target = <optimized out>
#3  0x00007fffe66c27e7 in _request_subchild (node=<optimized out>) at lib/elementary/efl_ui_focus_manager_calc.c:1520
        target = 0x0
        n = <optimized out>
        node = 0x555555bd0140
        __FUNCTION__ = "_efl_ui_focus_manager_calc_unregister"
#4  0x00007fffe66c27e7 in _request_subchild_except (except=0x555555bd0140, n=<optimized out>) at lib/elementary/efl_ui_focus_manager_calc.c:1015
        n = <optimized out>
        node = 0x555555bd0140
        __FUNCTION__ = "_efl_ui_focus_manager_calc_unregister"
#5  0x00007fffe66c27e7 in _efl_ui_focus_manager_calc_unregister (obj=0x400000006d2d, pd=0x555555a83a20, child=<optimized out>) at lib/elementary/efl_ui_focus_manager_calc.c:1042
        n = <optimized out>
        node = 0x555555bd0140
        __FUNCTION__ = "_efl_ui_focus_manager_calc_unregister"
#6  0x00007fffe66c0b2f in efl_ui_focus_manager_calc_unregister (obj=0x40000000692c, child=child@entry=0x4000000a47a3) at lib/elementary/efl_ui_focus_manager_calc.eo.c:42
        ___op = 941
        ___generation = 1
        ___call =
          {eo_id = 0x400000006d2d, obj = 0x555555a83990, func = 0x7fffe66c26a0 <_efl_ui_focus_manager_calc_unregister>, data = 0x555555a83a20, extn1 = 0x4000000259a8, extn2 = 0x400000000000, extn3 = 0xba, extn4 = 0x7fffe6716c00}
        _func_ = <optimized out>
#7  0x00007fffe6679038 in _efl_ui_widget_focus_state_apply (obj=0x4000000a47a3, pd=<optimized out>, current_state=..., configured_state=0x7fffffffca50, redirect=<optimized out>) at lib/elementary/efl_ui_widget.c:423
        registered = 1 '\001'
        __FUNCTION__ = "_efl_ui_widget_focus_state_apply"
#8  0x00007fffe667865d in efl_ui_widget_focus_state_apply (obj=obj@entry=0x4000000a47a3, current_state=..., configured_state=configured_state@entry=0x7fffffffca50, redirect=redirect@entry=0x0)
    at lib/elementary/efl_ui_widget.eo.c:186
        _r = <optimized out>
        ___op = 714
        ___generation = 1
        ___call =
          {eo_id = 0x4000000a47a3, obj = 0x555556536f20, func = 0x7fffe6678f20 <_efl_ui_widget_focus_state_apply>, data = 0x555556537170, extn1 = 0x0, extn2 = 0x7fffe66c65f2 <efl_ui_focus_object_focus_manager_get+114>, extn3 = 0x4000000259a8, extn4 = 0x55555627aaa0}
        _func_ = <optimized out>
#9  0x00007fffe668073d in _focus_state_eval (want_full=<optimized out>, should=0 '\000', pd=0x555556537170, obj=0x4000000a47a3) at lib/elementary/efl_ui_widget.c:505
        configuration = {manager = 0x0, parent = 0x0, logical = 0 '\000'}
        old_registered_parent = 0x4000000259a8
        old_registered_manager = 0x40000000692c
        should = 0 '\000'
        want_full = 0 '\000'
#10 0x00007fffe668073d in _full_eval (obj=0x4000000a47a3, pd=0x555556537170) at lib/elementary/efl_ui_widget.c:608
        old_registered_parent = 0x4000000259a8
        old_registered_manager = 0x40000000692c
        should = 0 '\000'
        want_full = 0 '\000'
#11 0x00007fffe667644f in efl_ui_widget_focus_allow_set (obj=0x4000000a47a3, can_focus=<optimized out>) at lib/elementary/efl_ui_widget.eo.c:34
        ___op = 676
        ___generation = 1
        ___call =
          {eo_id = 0x4000000a47a3, obj = 0x555556536f20, func = 0x7fffe6687800 <_efl_ui_widget_focus_allow_set>, data = 0x555556537170, extn1 = 0x7fffcfb74668, extn2 = 0x555556916640, extn3 = 0xffffffffffffffff, extn4 = 0x0}
        _func_ = <optimized out>
#12 0x00007fffe667e509 in elm_widget_can_focus_set (obj=<optimized out>, can_focus=<optimized out>) at lib/elementary/efl_ui_widget.eo.c:461
#13 0x00007fffe65fd8be in elm_object_focus_allow_set (obj=<optimized out>, enable=<optimized out>) at lib/elementary/elm_main.c:1614
        __FUNCTION__ = "elm_object_focus_allow_set"
#14 0x00007fffe6cc9436 in __pyx_pf_3efl_10elementary_8__init___6Object_11focus_allow_2__set__ (__pyx_v_self=0x7fffdb3a30e8, __pyx_v_allow=<optimized out>) at efl/elementary/__init__.c:273152
        __pyx_r = <optimized out>
#15 0x00007fffe6cc9436 in __pyx_pw_3efl_10elementary_8__init___6Object_11focus_allow_3__set__ (__pyx_v_allow=<optimized out>, __pyx_v_self=0x7fffdb3a30e8) at efl/elementary/__init__.c:10987
#16 0x00007fffe6cc9436 in __pyx_setprop_3efl_10elementary_8__init___6Object_focus_allow (o=0x7fffdb3a30e8, v=<optimized out>, x=<optimized out>) at efl/elementary/__init__.c:11799
#17 0x00007ffff724cf7c in _PyObject_GenericSetAttrWithDict () at /usr/lib/libpython3.6m.so.1.0
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:53 AM
bu5hm4n edited projects, added efl: widgets, Efl.Ui.Focus; removed Restricted Project.Jun 11 2018, 7:10 AM
bu5hm4n edited projects, added Restricted Project; removed Efl.Ui.Focus, efl: widgets.Jun 12 2018, 12:05 AM
zmike lowered the priority of this task from High to Pending on user input.Jun 29 2018, 1:54 PM
zmike added a subscriber: zmike.

More info/testing needed.

DaveMDS closed this task as Wontfix.Jul 9 2018, 12:01 PM

I gave up on using the elm focus in my media center some weeks ago, I wrote a custom focus handling instead.

So I don't have anymore a test for all the issues in this ticket