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/ecore/src/lib/ecore_evas/ecore_evas_x.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 'libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c')
-rw-r--r-- | libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c index d9ccd6e..7d3af12 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c | |||
@@ -1,4 +1,13 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <stdlib.h> | ||
1 | #include <string.h> | 6 | #include <string.h> |
7 | |||
8 | #include <Eina.h> | ||
9 | #include <Ecore.h> | ||
10 | |||
2 | #include "ecore_evas_private.h" | 11 | #include "ecore_evas_private.h" |
3 | #include "Ecore_Evas.h" | 12 | #include "Ecore_Evas.h" |
4 | 13 | ||
@@ -731,10 +740,14 @@ _ecore_evas_x_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *e | |||
731 | // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) | 740 | // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) |
732 | // return 0; | 741 | // return 0; |
733 | /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ | 742 | /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ |
734 | if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); | 743 | if (!ee->in) |
735 | ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); | 744 | { |
736 | evas_event_feed_mouse_in(ee->evas, e->time, NULL); | 745 | if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); |
737 | _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); | 746 | ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); |
747 | evas_event_feed_mouse_in(ee->evas, e->time, NULL); | ||
748 | _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); | ||
749 | ee->in = EINA_TRUE; | ||
750 | } | ||
738 | return ECORE_CALLBACK_PASS_ON; | 751 | return ECORE_CALLBACK_PASS_ON; |
739 | } | 752 | } |
740 | 753 | ||
@@ -783,13 +796,23 @@ _ecore_evas_x_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void * | |||
783 | // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) | 796 | // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) |
784 | // return 0; | 797 | // return 0; |
785 | /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ | 798 | /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ |
786 | ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); | 799 | // printf("OUT: ee->in=%i, e->mode=%i, e->detail=%i, dount_count=%i\n", |
787 | _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); | 800 | // ee->in, e->mode, e->detail, evas_event_down_count_get(ee->evas)); |
788 | if (e->mode == ECORE_X_EVENT_MODE_GRAB) | 801 | if (ee->in) |
789 | evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); | 802 | { |
790 | evas_event_feed_mouse_out(ee->evas, e->time, NULL); | 803 | if ((evas_event_down_count_get(ee->evas) > 0) && |
791 | if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); | 804 | (!((e->mode == ECORE_X_EVENT_MODE_GRAB) && |
792 | if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); | 805 | (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR)))) |
806 | return ECORE_CALLBACK_PASS_ON; | ||
807 | ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); | ||
808 | _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); | ||
809 | if (e->mode == ECORE_X_EVENT_MODE_GRAB) | ||
810 | evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); | ||
811 | evas_event_feed_mouse_out(ee->evas, e->time, NULL); | ||
812 | if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); | ||
813 | if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); | ||
814 | ee->in = EINA_FALSE; | ||
815 | } | ||
793 | return ECORE_CALLBACK_PASS_ON; | 816 | return ECORE_CALLBACK_PASS_ON; |
794 | } | 817 | } |
795 | 818 | ||
@@ -1023,6 +1046,14 @@ _ecore_evas_x_event_window_hide(void *data __UNUSED__, int type __UNUSED__, void | |||
1023 | ee = ecore_event_window_match(e->win); | 1046 | ee = ecore_event_window_match(e->win); |
1024 | if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ | 1047 | if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ |
1025 | if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | 1048 | if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; |
1049 | if (ee->in) | ||
1050 | { | ||
1051 | evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); | ||
1052 | evas_event_feed_mouse_out(ee->evas, e->time, NULL); | ||
1053 | if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); | ||
1054 | if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); | ||
1055 | ee->in = EINA_FALSE; | ||
1056 | } | ||
1026 | if (!ee->visible) return ECORE_CALLBACK_PASS_ON; | 1057 | if (!ee->visible) return ECORE_CALLBACK_PASS_ON; |
1027 | // if (!ee->visible) return ECORE_CALLBACK_DONE; | 1058 | // if (!ee->visible) return ECORE_CALLBACK_DONE; |
1028 | // printf("HIDE EVENT %p\n", ee); | 1059 | // printf("HIDE EVENT %p\n", ee); |