summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2016-12-02 17:50:43 -0200
committerBruno Dilly <bdilly@profusion.mobi>2016-12-19 14:58:35 -0200
commit0ab6567b3e5ef63e97c97db01497619b7ea57f8d (patch)
tree00604248212822a5cf7fc09ab5e3e6edbd2f2f4d /src/lib/edje
parent7ef5f6c3a0a6893552a7f13aa2777e3b9480e343 (diff)
edje: accept optional seat parameter on FOCUS_OBJECT
If not provided, FOCUS_OBJECT action will keep acting over default seat. Also include a usage on edje-multiseat test (actually no example was exercising this action).
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_program.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 3cc0d2d873..a2df439e87 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -1032,11 +1032,29 @@ low_mem_current:
1032 break; 1032 break;
1033 1033
1034 case EDJE_ACTION_TYPE_FOCUS_OBJECT: 1034 case EDJE_ACTION_TYPE_FOCUS_OBJECT:
1035 {
1036 Efl_Input_Device *seat = NULL;
1037
1038 if (pr->seat)
1039 {
1040 Eina_Stringshare *seat_name;
1041
1042 seat_name = eina_stringshare_add(pr->seat);
1043 seat = _edje_seat_get(ed, seat_name);
1044 eina_stringshare_del(seat_name);
1045 }
1046 if (!seat)
1047 {
1048 Evas *e;
1049
1050 e = evas_object_evas_get(ed->obj);
1051 seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_CLASS_SEAT);
1052 }
1035 if (!pr->targets) 1053 if (!pr->targets)
1036 { 1054 {
1037 Evas_Object *focused; 1055 Evas_Object *focused;
1038 1056
1039 focused = evas_focus_get(evas_object_evas_get(ed->obj)); 1057 focused = evas_seat_focus_get(evas_object_evas_get(ed->obj), seat);
1040 if (focused) 1058 if (focused)
1041 { 1059 {
1042 unsigned int i; 1060 unsigned int i;
@@ -1050,7 +1068,7 @@ low_mem_current:
1050 (rp->typedata.swallow)) && 1068 (rp->typedata.swallow)) &&
1051 (rp->typedata.swallow->swallowed_object == focused)) 1069 (rp->typedata.swallow->swallowed_object == focused))
1052 { 1070 {
1053 evas_object_focus_set(focused, EINA_FALSE); 1071 evas_object_seat_focus_del(focused, seat);
1054 break; 1072 break;
1055 } 1073 }
1056 } 1074 }
@@ -1067,11 +1085,13 @@ low_mem_current:
1067 ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1085 ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
1068 (rp->typedata.swallow)) && 1086 (rp->typedata.swallow)) &&
1069 (rp->typedata.swallow->swallowed_object)) 1087 (rp->typedata.swallow->swallowed_object))
1070 evas_object_focus_set(rp->typedata.swallow->swallowed_object, EINA_TRUE); 1088 evas_object_seat_focus_add(
1089 rp->typedata.swallow->swallowed_object, seat);
1071 } 1090 }
1072 } 1091 }
1073 } 1092 }
1074 break; 1093 }
1094 break;
1075 1095
1076 case EDJE_ACTION_TYPE_SOUND_SAMPLE: 1096 case EDJE_ACTION_TYPE_SOUND_SAMPLE:
1077 if (_edje_block_break(ed)) 1097 if (_edje_block_break(ed))