elm_widget: move the complete regsiter/unregister logic
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Sat, 2 Sep 2017 17:08:18 +0000 (19:08 +0200)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Sat, 2 Sep 2017 19:10:56 +0000 (21:10 +0200)
commitc51f35d42a148b34a9cf74714ecc16609984eecb
tree9e7fa063e796c20c93ca695fa4b729a9e1843044
parent3af81932b04c60f89903834057dfb652cdcd9d5c
elm_widget: move the complete regsiter/unregister logic

We had here a little problem, state focus_state_eval function handled
the unregisteration and consideration of the focus flags and then only
called a helper function (which was a widget function), that then did
the registeration in logical or regular mode.

Elm scroller for example took that function overwrote it and did onyl
permit logical registrations. Then again a evaluation of the focus state
and flags took place, and the function considered elm_scroller should be
registered as regular object, but found it to be logical. This lead to
the problem that we permantently unregistered Elm.Scroller and
registered it again as logical just to unregister it again. This was on
the one side a performance downside. But also a bug since all items from
within the Elm_Scrollers sub manager are getting reparent onto the
parent, which means not the root of the scroller (the scroller itself)
is the logical entrypoint to the widget but rather this reparented
widget, which led to unexpected focus  warps like described in T5923.

tldr: this fixes T5923
13 files changed:
src/lib/elementary/elc_fileselector.c
src/lib/elementary/elm_box.c
src/lib/elementary/elm_box.eo
src/lib/elementary/elm_fileselector.eo
src/lib/elementary/elm_scroller.c
src/lib/elementary/elm_scroller.eo
src/lib/elementary/elm_table.c
src/lib/elementary/elm_table.eo
src/lib/elementary/elm_toolbar.c
src/lib/elementary/elm_toolbar.eo
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo
src/lib/elementary/elm_widget.h