edje: make it handle late appearing of devices

device adds can happen late, which means evas does not know the default
device until a time that is later than the focusing of some edje part.
Which means that keystrokes etc. are lost for the parts beeing focused
before the default device appeared. This should fix that.

For the later people in this world: Watch out! someone decided to map
seats in edje with a linear counter starting at 1, which means
seat0<->seat1 seat1<->seat2 thanks for that riddle, i feel like i have
beaten the sphinxs.

fix T6022
This commit is contained in:
Marcel Hollerbach 2017-09-13 21:27:02 +02:00
parent f5487c5d3e
commit c935249d7e
1 changed files with 6 additions and 0 deletions

View File

@ -1285,6 +1285,9 @@ _edje_focused_part_set(Edje *ed, Eina_Stringshare *seat_name, Edje_Real_Part *rp
Edje_Seat *seat;
Eina_List *l;
//defaulting seat NULL to seat1
if (!seat_name) seat_name = eina_stringshare_add("seat1");
EINA_LIST_FOREACH(ed->seats, l, seat)
{
if (seat_name == seat->name)
@ -1311,6 +1314,9 @@ _edje_focused_part_get(Edje *ed, Eina_Stringshare *seat_name)
Edje_Seat *seat;
Eina_List *l;
//defaulting seat NULL to seat1
if (!seat_name) seat_name = eina_stringshare_add("seat1");
EINA_LIST_FOREACH(ed->seats, l, seat)
{
if (seat_name == seat->name)