it turns out that it is useful and needed (for future patches) to
request moves for nodes that are not focused currently. It is also
needed to request a move that might end up in a logical node.
requesting subchild for subchild is not a good idea, as it really only
fetches for a subchild, and never calls next and escapes the children of
the passed node.
fix T6793
When the subchild where we request subchilds from was regular, the while
loop would have run infinitly. This is now fixed by at least calling
once _next, the check to not run outside the node is now done with
calculating the depth of the nodes.
settings the redirect might result in unfocus calls, that might unset
evas_object_focus on a object that might be registered in two managers
due to border linking. This fixes mysterical disapearing focus.
when there is only one object in a manager, and this object has a
redirect manager, then right now nothing will happen and nothing will be
called on the redirect manager.
With this patch the redirect manager will be unset when the manager
cannot give a correct candidate.
Summary:
redirect is out of the focus stack. we need to find redirect_entry after last
node of redirect manager instead of focus stack.
Test Plan:
1. elementary_test -to focus
2. move focus using tab key
3. check that there is focus cycle
Reviewers: bu5hm4n
Reviewed By: bu5hm4n
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5811
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.
Test Plan: make check
Reviewers: bu5hm4n
Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg
Differential Revision: https://phab.enlightenment.org/D5734
This fixes some of the warnings generated by calling functions on NULL
objects. One of the main remaining points is to avoid unwanted warnings
on non-existing parts.
Ref T6326
Summary:
we can consider that the node is freed during focus_manager routine.
for example, efl_ui_focus_manager_redirect_set call edje event callbacks,
and a application can delete a object in the edje callback. if the object is
the focusable object of a node, focus_manager make the node freed.
the focus_manager is able to use freed node. (a good example is test_popup.c)
this prevent reusing freed pointers.
Test Plan:
1. elementary_test -to popup
2. popup-center-text + 1 button
3. Click the Close button
4. check that there is no erroe message
Reviewers: bu5hm4n
Reviewed By: bu5hm4n
Subscribers: cedric, woohyun, jpeg, Jaehyun_Cho
Differential Revision: https://phab.enlightenment.org/D5729
holding them in the same list is a problem due to the fact that a member
B in partners of A means that there also needs to be A in the partners
of A. Due to this fact the cleanup logic before missed a few nodes and
crashed in some cases. This is now fixed.
The new calculation mechanism does not only look into the exact
directions up,right,down,left of a node, it also now checks the sectors,
bound by: x < node.x, x > node.max_x, y < node.y, y > node.max_y.
ref T6453
this now keeps items arround even if a explicit other widget was
focused. This is usefull if we have a few logical items on the focus
stack and you remove them.
_followup_previous_direction should only be called if there was a real
change to the redirect. In was happening that we have not changed the
focus but called _followup_previous_direction, which lead to weird focus
changes.
in default focus just sets the focus to the first item in the redirect
manager, we now reset that back and move the focus to the last element
of a item.
entry for example is here a specialcase since it registeres itself as
logical with a redirect manager that is then empty and only has a root
element, which is again itself.
reduces the load of debug messages, and the debug messages are now only
emitted from the manager that is not the redirect. And the real elements
that are focused are printed
If you call focus_set(m, o) where o is a logical child, then the focus
will go to any none logical child of o, or if there is nothing in the
children of o, then the focus will remain on the now focused element.
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.
But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.
Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).
@feature
it turns out that we should also repsect logical elements that are
having a redirect_manager, since they are more at the "end" then a
potential regular node.
The user now needs to handle the logical_end call on this manager, or
handle at all what he wants to do with this information.
efl_ui_win now handles it in the way that it just focuses that logical
node, (which results in the redirect manager beeing set, then calling
again logical_end on that manager. Repeating this until we have finally
found a regular node that does fit out needs.
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.
This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct