diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/evas/src/lib/canvas/evas_focus.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_focus.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c index a1a3bca..29da7e7 100644 --- a/libraries/evas/src/lib/canvas/evas_focus.c +++ b/libraries/evas/src/lib/canvas/evas_focus.c | |||
@@ -10,29 +10,31 @@ | |||
10 | EAPI void | 10 | EAPI void |
11 | evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) | 11 | evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) |
12 | { | 12 | { |
13 | int event_id = 0; | ||
13 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | 14 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); |
14 | return; | 15 | return; |
15 | MAGIC_CHECK_END(); | 16 | MAGIC_CHECK_END(); |
16 | 17 | ||
17 | _evas_object_event_new(); | 18 | _evas_object_event_new(); |
18 | 19 | ||
20 | event_id = _evas_event_counter; | ||
19 | if (focus) | 21 | if (focus) |
20 | { | 22 | { |
21 | if (obj->focused) goto end; | 23 | if (obj->focused) goto end; |
22 | if (obj->layer->evas->focused) | 24 | if (obj->layer->evas->focused) |
23 | evas_object_focus_set(obj->layer->evas->focused, 0); | 25 | evas_object_focus_set(obj->layer->evas->focused, 0); |
24 | obj->focused = 1; | 26 | obj->focused = 1; |
25 | obj->layer->evas->focused = obj; | 27 | obj->layer->evas->focused = obj; |
26 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL); | 28 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); |
27 | evas_event_callback_call(obj->layer->evas, | 29 | evas_event_callback_call(obj->layer->evas, |
28 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); | 30 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); |
29 | } | 31 | } |
30 | else | 32 | else |
31 | { | 33 | { |
32 | if (!obj->focused) goto end; | 34 | if (!obj->focused) goto end; |
33 | obj->focused = 0; | 35 | obj->focused = 0; |
34 | obj->layer->evas->focused = NULL; | 36 | obj->layer->evas->focused = NULL; |
35 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); | 37 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); |
36 | evas_event_callback_call(obj->layer->evas, | 38 | evas_event_callback_call(obj->layer->evas, |
37 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); | 39 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); |
38 | } | 40 | } |