Commit Graph

28 Commits

Author SHA1 Message Date
Marcel Hollerbach 912dfe270e efl_ui_focus_manager_root_focus: perform focus switch delayed
Summary:
Delaying the unregistering here ensures that there is not focus set call
while a object is beeing registered in the focus manager.

ref T8081

Reviewers: zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8081

Differential Revision: https://phab.enlightenment.org/D9513
2019-08-06 10:52:32 -04:00
Christopher Michael a7cf1b4c3c efl_ui_focus_manager_root_focus: Remove extra blank lines
NB: No functional changes
2019-01-16 11:34:18 -05:00
Marcel Hollerbach ef874d5b59 efl_ui_focus_manager: performance optimize order setting
setting the order is a little bit expensive, this performance optimizes
order setting in the focus manager.  We don't need to set the order each
time something is registered, it is enough to set it once we need the
correct order.

We don't need to evalulate the state in the Manager_Root_Focus if the
rect is not registered. If its not, then another new element cannot
cause the rect to be registered.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7450
2018-12-17 09:12:22 +01:00
Carsten Haitzler cc3a5252f1 efl ui focus manager - fix unused param warn 2018-12-04 08:37:59 +00:00
Marcel Hollerbach 1ede2302d3 efl_ui_focus_manager_root_focus: ensure that adapter is part of viewport
This ensures that the adapter part is part of the viewport elements and
border elements. This is done in order to support cases where a
elm_scroller content is not focusable. Before the element was not
correctly in viewport, and so not correctly registered.

ref T6804

Differential Revision: https://phab.enlightenment.org/D7364
2018-12-04 08:45:49 +01:00
Marcel Hollerbach a444ff743f elm_interface_scrollable: add support for *jumping* into a scroller
Until recently we have been only registering the border elements of the
graph, (so only the elements that don't have a neighboor). However this
lead to the situation that a scroller that is scrolled into the middle
(so not the x nor the y axis is scrolled to the max), is not accessable.

Now, we register all elements that have a neighboor in the outside.
The patch in the test suite is required in order to provide the correct
geometry to the implementation of efl_ui_focus_manager_sub.

Differential Revision: https://phab.enlightenment.org/D7360
2018-12-04 08:45:49 +01:00
Marcel Hollerbach 11147284fe efl_ui_focus_manager_root_focus: mirror the focus properties correctly
Summary:
this object takes a internal dummy object, and thus the properties
should be mirrored to the real root.

The focus property on the root of the manager is required that the outer world really sees that the focus is on the root or not.

Depends on D6506

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6510
2018-07-05 15:09:18 -04:00
Marcel Hollerbach 8e104d5bfe efl_ui_focus_manager_root_focus: restructure state eval
registering and unregsitering caused a few issues.
- Relations are recalculated even if they should not be
- We unfocus a element just to refocus it again
- We loose any iinformation about custom chains that have been set meanwhile

This fixes it
2018-05-10 13:34:17 +02:00
Marcel Hollerbach 05d4f0b256 efl_ui_focus_manager_root_focus: support a custom canvas object 2018-05-10 13:34:03 +02:00
Marcel Hollerbach d7011b52e7 efl_ui_focus_composition: add fields for manager and parent
the manager objects are build on the assertion that registered elements
are returning the manager they are registered on if
efl_ui_focus_object_manager_get is called.
2018-04-25 00:16:50 +02:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Marcel Hollerbach 01272c71d0 efl_ui_focus_manager: make request_move more powerfull
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.
2018-04-13 11:07:33 +02:00
Marcel Hollerbach f4b70fc6cd efl_ui_focus_manager_root_focus: maintain focus state over state eval
the rect is unregistered and registered again, if it was focused, still
focus it.
2018-04-11 10:33:19 +02:00
Marcel Hollerbach e70bf4e231 efl_ui_focus_manager_root_focus: refactor _state_eval
Summary:
we have to check whether all of descendant are none_logical.

this fixes T6800

Test Plan:
1. elementary_test -to ctxpopup
2. Click 'Ctxpopup with user content'
3. Try focus ctxpopup content(button) using arrow key.
4. Check that the content is focused (you can move scroll bar)

Reviewers: bu5hm4n

Subscribers: raster, cedric

Maniphest Tasks: T6800

Differential Revision: https://phab.enlightenment.org/D5856
2018-04-09 18:27:09 +02:00
Carsten Haitzler e29102e134 Revert "efl_ui_focus_manager_root_focus: refactor _state_eval"
This reverts commit c6ce04e48f.

OK. I bisected and found that this is ythe root cause for 2 pretty
chunky bugs. Reverting this fixes T6870 and fixes T6871.

so that's 2 segvs in existing uses and even olne (elm config) ships
with efl. Having a look at the diff doesn't jump out what is wrong
here, but the best course IMHO is to take this patch and put it back
into review again... :)
2018-04-07 16:42:51 +09:00
YeongJong Lee c6ce04e48f efl_ui_focus_manager_root_focus: refactor _state_eval
Summary:
we have to check whether all of descendant are none_logical.

ref T6800

Test Plan:
1. elementary_test -to ctxpopup
2. Click 'Ctxpopup with user content'
3. Try focus ctxpopup content(button) using arrow key.
4. Check that the content is focused (you can move scroll bar)

Reviewers: bu5hm4n

Subscribers: cedric

Maniphest Tasks: T6800

Differential Revision: https://phab.enlightenment.org/D5856
2018-04-04 19:52:46 +02:00
Marcel Hollerbach 432deb1129 efl_ui_focus_manager_root_focus: switch to focus adapter 2018-03-15 15:39:12 +01:00
Marcel Hollerbach baf624680d efl_ui_focus_manager: fix api duplication 2017-12-05 17:19:28 +01:00
Marcel Hollerbach 07cb2d2dcd efl_ui_focus_object: document the bahaviour of the manager property 2017-11-15 13:21:22 +01:00
Pawel Aksiutowicz e2ad1469a5 focus: Some typos for efl_ui_focus_manager fixed
Reviewers: stanluk, lukasz.stanislawski

Subscribers: lukasz.stanislawski, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5433
2017-11-08 15:16:04 +09:00
Marcel Hollerbach 7a86e23642 efl_ui_Focus_manager_root_focus: add focus rectangle
the focus rectangle is basically just a normal efl.canvas.rectangle, but
with the focus interface implemented.

This fixes alot of errors which gets called when the root_focus manager
is used, with the submanager as mixin.
2017-10-10 19:28:47 +02:00
Marcel Hollerbach e8039ffc2d efl_ui_focus_manager_root_focus: correctly call state eval
when a new item is registered we should eval state to unregister the
rect
2017-10-10 19:28:47 +02:00
Marcel Hollerbach e3c87f8fed efl_ui_focus_manager_root_focus: only register if we really need to 2017-10-10 19:28:47 +02:00
Jean-Philippe Andre 4c0167916b focus: Avoid infinite loop in window
I kept the safety error message for easier debugging.
Test scenario:
  elementary_test -to "Window Inline"
  Click on an entry. Press Shift+Tab.

Ping @bu5hm4n
2017-10-10 19:32:50 +09:00
Marcel Hollerbach ea5b0bdfde efl_ui_focus_manager: make logical_end work better
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.
2017-08-30 22:39:52 +02:00
Marcel Hollerbach df3d0e3d7b efl_ui_focus_manager: make focus a property 2017-08-10 20:56:04 +02:00
Marcel Hollerbach d4cd85aa55 efl_ui_focus_manager: split this of tinto a class and a interface
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
2017-08-10 20:55:50 +02:00
Marcel Hollerbach a7fb6e92b2 introduce efl_ui_focus_manager_root_focus
add a class that fills a dummy element for the case of no element added
at all.
2017-05-26 21:34:24 +02:00