summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-22 15:30:10 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-22 15:42:40 -0500
commit77b31ba0237a9579ac317f8c1ef3b9a73c17ebd1 (patch)
treedfdbdeae68a3f9a5d41bc18961b3ff385a524f8f
parentcac28eeb7e68134cb8e48eec91407ed1c3727976 (diff)
evas event_grabber: fix child ordering when adding non-top children
another ref 0516cdc0f9dc0969ac96df6984af2413680cad01 @fix
-rw-r--r--src/lib/evas/canvas/efl_canvas_object_event_grabber.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_object_event_grabber.c b/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
index ddf31c90ba..01851897e9 100644
--- a/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
+++ b/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
@@ -123,13 +123,21 @@ _child_insert(Efl_Object_Event_Grabber_Data *pd, Evas_Object_Protected_Data *obj
123 if (a->layer->layer > obj->layer->layer) continue; 123 if (a->layer->layer > obj->layer->layer) continue;
124 if (a->layer->layer < obj->layer->layer) 124 if (a->layer->layer < obj->layer->layer)
125 { 125 {
126 /* new object is higher layer than 'a' */
126 found = EINA_TRUE; 127 found = EINA_TRUE;
127 break; 128 break;
128 } 129 }
129 EINA_INLIST_FOREACH(EINA_INLIST_GET(a->layer->objects), i) 130 EINA_INLIST_FOREACH(EINA_INLIST_GET(a->layer->objects), i)
130 { 131 {
131 if (a == i || obj == i) 132 if (obj == i)
132 { 133 {
134 /* new object is below 'a' */
135 pd->contained = eina_list_prepend_relative(pd->contained, obj, a);
136 return;
137 }
138 else if (a == i)
139 {
140 /* new object is above 'a' */
133 found = EINA_TRUE; 141 found = EINA_TRUE;
134 break; 142 break;
135 } 143 }