summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-11-26 21:44:34 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-11-26 21:44:34 +0000
commit79e00d2786f9e544c521bbbf0b8559fccc1b49eb (patch)
tree8d994ffeefd21b0312d91d54519fedc016796f46 /legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c
parentc823b3fe29eadf6399a448c52d8639e5d90cb419 (diff)
Ecore_Evas: Initialize event structs before sending them.
Event structs used for IPC must be correctly initialized, since they are not aligned. This fixes some warnings reported by valgrind. SVN revision: 79726
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c
index 0a65bb6e2a..2e1dac5cf8 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_extn.c
@@ -687,6 +687,7 @@ _ecore_evas_extn_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
687 if (extn->ipc.server) 687 if (extn->ipc.server)
688 { 688 {
689 Ipc_Data_Ev_Mouse_In ipc; 689 Ipc_Data_Ev_Mouse_In ipc;
690 memset(&ipc, 0, sizeof(ipc));
690 691
691 ipc.timestamp = ev->timestamp; 692 ipc.timestamp = ev->timestamp;
692 ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); 693 ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas);
@@ -707,6 +708,7 @@ _ecore_evas_extn_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
707 if (extn->ipc.server) 708 if (extn->ipc.server)
708 { 709 {
709 Ipc_Data_Ev_Mouse_Out ipc; 710 Ipc_Data_Ev_Mouse_Out ipc;
711 memset(&ipc, 0, sizeof(ipc));
710 712
711 ipc.timestamp = ev->timestamp; 713 ipc.timestamp = ev->timestamp;
712 ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); 714 ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas);
@@ -729,6 +731,7 @@ _ecore_evas_extn_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
729 /* We have send mouse move event before mouse down event */ 731 /* We have send mouse move event before mouse down event */
730 { 732 {
731 Ipc_Data_Ev_Mouse_Move ipc_move; 733 Ipc_Data_Ev_Mouse_Move ipc_move;
734 memset(&ipc_move, 0, sizeof(ipc_move));
732 Evas_Coord x, y; 735 Evas_Coord x, y;
733 736
734 x = ev->canvas.x; 737 x = ev->canvas.x;
@@ -743,6 +746,7 @@ _ecore_evas_extn_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
743 } 746 }
744 { 747 {
745 Ipc_Data_Ev_Mouse_Down ipc; 748 Ipc_Data_Ev_Mouse_Down ipc;
749 memset(&ipc, 0, sizeof(ipc));
746 ipc.b = ev->button; 750 ipc.b = ev->button;
747 ipc.flags = ev->flags; 751 ipc.flags = ev->flags;
748 ipc.timestamp = ev->timestamp; 752 ipc.timestamp = ev->timestamp;
@@ -765,6 +769,7 @@ _ecore_evas_extn_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
765 if (extn->ipc.server) 769 if (extn->ipc.server)
766 { 770 {
767 Ipc_Data_Ev_Mouse_Up ipc; 771 Ipc_Data_Ev_Mouse_Up ipc;
772 memset(&ipc, 0, sizeof(ipc));
768 773
769 ipc.b = ev->button; 774 ipc.b = ev->button;
770 ipc.flags = ev->flags; 775 ipc.flags = ev->flags;
@@ -787,6 +792,7 @@ _ecore_evas_extn_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
787 if (extn->ipc.server) 792 if (extn->ipc.server)
788 { 793 {
789 Ipc_Data_Ev_Mouse_Move ipc; 794 Ipc_Data_Ev_Mouse_Move ipc;
795 memset(&ipc, 0, sizeof(ipc));
790 Evas_Coord x, y; 796 Evas_Coord x, y;
791 797
792 x = ev->cur.canvas.x; 798 x = ev->cur.canvas.x;
@@ -813,6 +819,7 @@ _ecore_evas_extn_cb_mouse_wheel(void *data, Evas *e EINA_UNUSED, Evas_Object *ob
813 if (extn->ipc.server) 819 if (extn->ipc.server)
814 { 820 {
815 Ipc_Data_Ev_Mouse_Wheel ipc; 821 Ipc_Data_Ev_Mouse_Wheel ipc;
822 memset(&ipc, 0, sizeof(ipc));
816 823
817 ipc.direction = ev->direction; 824 ipc.direction = ev->direction;
818 ipc.z = ev->z; 825 ipc.z = ev->z;
@@ -835,6 +842,7 @@ _ecore_evas_extn_cb_multi_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
835 if (extn->ipc.server) 842 if (extn->ipc.server)
836 { 843 {
837 Ipc_Data_Ev_Multi_Down ipc; 844 Ipc_Data_Ev_Multi_Down ipc;
845 memset(&ipc, 0, sizeof(ipc));
838 Evas_Coord x, y; 846 Evas_Coord x, y;
839 847
840 ipc.d = ev->device; 848 ipc.d = ev->device;
@@ -871,6 +879,7 @@ _ecore_evas_extn_cb_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
871 if (extn->ipc.server) 879 if (extn->ipc.server)
872 { 880 {
873 Ipc_Data_Ev_Multi_Up ipc; 881 Ipc_Data_Ev_Multi_Up ipc;
882 memset(&ipc, 0, sizeof(ipc));
874 Evas_Coord x, y; 883 Evas_Coord x, y;
875 884
876 ipc.d = ev->device; 885 ipc.d = ev->device;
@@ -906,6 +915,7 @@ _ecore_evas_extn_cb_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
906 if (extn->ipc.server) 915 if (extn->ipc.server)
907 { 916 {
908 Ipc_Data_Ev_Multi_Move ipc; 917 Ipc_Data_Ev_Multi_Move ipc;
918 memset(&ipc, 0, sizeof(ipc));
909 Evas_Coord x, y; 919 Evas_Coord x, y;
910 920
911 ipc.d = ev->device; 921 ipc.d = ev->device;
@@ -1061,6 +1071,7 @@ _ecore_evas_extn_cb_hold(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
1061 if (extn->ipc.server) 1071 if (extn->ipc.server)
1062 { 1072 {
1063 Ipc_Data_Ev_Hold ipc; 1073 Ipc_Data_Ev_Hold ipc;
1074 memset(&ipc, 0, sizeof(ipc));
1064 1075
1065 ipc.hold = ev->hold; 1076 ipc.hold = ev->hold;
1066 ipc.timestamp = ev->timestamp; 1077 ipc.timestamp = ev->timestamp;